@magmamath/students-features 0.10.0 → 0.11.0-rc.10

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 (538) hide show
  1. package/dist/commonjs/features/celebrations/helpers.js +4 -1
  2. package/dist/commonjs/features/celebrations/helpers.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +120 -0
  4. package/dist/commonjs/features/chatbot/components/Chat/Chat.js +229 -45
  5. package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
  6. package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js +39 -0
  7. package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js.map +1 -0
  8. package/dist/commonjs/features/chatbot/components/Chat/GradientFade.js +44 -0
  9. package/dist/commonjs/features/chatbot/components/Chat/GradientFade.js.map +1 -0
  10. package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +46 -54
  11. package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
  12. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +1 -1
  13. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  14. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
  15. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  16. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
  17. package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js +41 -0
  18. package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +1 -0
  19. package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  20. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +16 -4
  21. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
  22. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +14 -34
  23. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
  24. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +20 -15
  25. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  26. package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
  27. package/dist/commonjs/features/chatbot/components/Chatbot.js +30 -7
  28. package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
  29. package/dist/commonjs/features/chatbot/constants.js +2 -1
  30. package/dist/commonjs/features/chatbot/constants.js.map +1 -1
  31. package/dist/commonjs/features/chatbot/helpers/ttsHighlight.js +29 -0
  32. package/dist/commonjs/features/chatbot/helpers/ttsHighlight.js.map +1 -0
  33. package/dist/commonjs/features/chatbot/helpers.js +19 -2
  34. package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
  35. package/dist/commonjs/features/chatbot/index.js.map +1 -1
  36. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +65 -17
  37. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  38. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +2 -2
  39. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
  40. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +2 -1
  41. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
  42. package/dist/commonjs/features/chatbot/model/ChatTTSHighlightModel.js +56 -0
  43. package/dist/commonjs/features/chatbot/model/ChatTTSHighlightModel.js.map +1 -0
  44. package/dist/commonjs/features/chatbot/model/ChatTTSModel.js +154 -0
  45. package/dist/commonjs/features/chatbot/model/ChatTTSModel.js.map +1 -0
  46. package/dist/commonjs/features/chatbot/model/ChatbotApi.js +1 -1
  47. package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
  48. package/dist/commonjs/features/chatbot/model/ChatbotTranslation.js +1 -1
  49. package/dist/commonjs/features/chatbot/model/ChatbotTranslation.js.map +1 -1
  50. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +9 -0
  51. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -1
  52. package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
  53. package/dist/commonjs/features/chatbot/types/t2s.types.js.map +1 -1
  54. package/dist/commonjs/features/feedback/model/model.js.map +1 -1
  55. package/dist/commonjs/features/feedback/model/sockets.js +8 -5
  56. package/dist/commonjs/features/feedback/model/sockets.js.map +1 -1
  57. package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +2 -2
  58. package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
  59. package/dist/commonjs/features/keyboard/components/BasicLayout/BasicLayout.js +2 -2
  60. package/dist/commonjs/features/keyboard/components/BasicLayout/BasicLayout.js.map +1 -1
  61. package/dist/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.js +4 -4
  62. package/dist/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.js.map +1 -1
  63. package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js +2 -2
  64. package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js.map +1 -1
  65. package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js +4 -4
  66. package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js.map +1 -1
  67. package/dist/commonjs/features/keyboard/components/Keyboard.js +4 -2
  68. package/dist/commonjs/features/keyboard/components/Keyboard.js.map +1 -1
  69. package/dist/commonjs/features/keyboard/components/MainLayout/MainLayout.js +1 -6
  70. package/dist/commonjs/features/keyboard/components/MainLayout/MainLayout.js.map +1 -1
  71. package/dist/commonjs/features/keyboard/components/UnitsLayout/UnitTabs.js +1 -1
  72. package/dist/commonjs/features/keyboard/components/UnitsLayout/helpers.js +3 -1
  73. package/dist/commonjs/features/keyboard/components/UnitsLayout/helpers.js.map +1 -1
  74. package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +27 -6
  75. package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
  76. package/dist/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.js +9 -1
  77. package/dist/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.js.map +1 -1
  78. package/dist/commonjs/features/keyboard/components/UnitsLayout/types.js +1 -0
  79. package/dist/commonjs/features/keyboard/components/UnitsLayout/types.js.map +1 -1
  80. package/dist/commonjs/features/keyboard/constants/constants.js +1 -1
  81. package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js +2 -1
  82. package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
  83. package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js +20 -4
  84. package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js.map +1 -1
  85. package/dist/commonjs/features/keyboard/helpers.js +7 -0
  86. package/dist/commonjs/features/keyboard/helpers.js.map +1 -1
  87. package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js +20 -3
  88. package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
  89. package/dist/commonjs/features/keyboard/types/MathKeysGroups/units.js +6 -3
  90. package/dist/commonjs/features/keyboard/types/MathKeysGroups/units.js.map +1 -1
  91. package/dist/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.js +34 -0
  92. package/dist/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.js.map +1 -0
  93. package/dist/commonjs/features/openEnded/components/OpenEndedScoreLabel.js +77 -0
  94. package/dist/commonjs/features/openEnded/components/OpenEndedScoreLabel.js.map +1 -0
  95. package/dist/commonjs/features/openEnded/index.js +48 -0
  96. package/dist/commonjs/features/openEnded/index.js.map +1 -0
  97. package/dist/commonjs/features/openEnded/oe.helpers.js +26 -0
  98. package/dist/commonjs/features/openEnded/oe.helpers.js.map +1 -0
  99. package/dist/commonjs/features/openEnded/oe.types.js +14 -0
  100. package/dist/commonjs/features/openEnded/oe.types.js.map +1 -0
  101. package/dist/commonjs/index.js +13 -1
  102. package/dist/commonjs/index.js.map +1 -1
  103. package/dist/commonjs/lib/components/ConditionalWrapper.js +23 -0
  104. package/dist/commonjs/lib/components/ConditionalWrapper.js.map +1 -0
  105. package/dist/commonjs/shared/common.constants.js +9 -0
  106. package/dist/commonjs/shared/common.constants.js.map +1 -0
  107. package/dist/commonjs/shared/icons/TimeIcon.js +37 -0
  108. package/dist/commonjs/shared/icons/TimeIcon.js.map +1 -0
  109. package/dist/commonjs/shared/icons/keyboard/CDotIcon/CDotIcon.js +4 -4
  110. package/dist/commonjs/shared/icons/keyboard/CDotIcon/CDotIcon.js.map +1 -1
  111. package/dist/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js +32 -0
  112. package/dist/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js.map +1 -0
  113. package/dist/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js +32 -0
  114. package/dist/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js.map +1 -0
  115. package/dist/commonjs/shared/translation/localization/ca.json +4 -2
  116. package/dist/commonjs/shared/translation/localization/de.json +4 -2
  117. package/dist/commonjs/shared/translation/localization/en.json +4 -2
  118. package/dist/commonjs/shared/translation/localization/gb.json +4 -2
  119. package/dist/commonjs/shared/translation/localization/sct.json +4 -2
  120. package/dist/commonjs/shared/translation/localization/sw.json +4 -2
  121. package/dist/commonjs/types/common.types.js +4 -0
  122. package/dist/module/features/celebrations/helpers.js +4 -1
  123. package/dist/module/features/celebrations/helpers.js.map +1 -1
  124. package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +120 -0
  125. package/dist/module/features/chatbot/components/Chat/Chat.js +231 -47
  126. package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
  127. package/dist/module/features/chatbot/components/Chat/CloseButton.js +33 -0
  128. package/dist/module/features/chatbot/components/Chat/CloseButton.js.map +1 -0
  129. package/dist/module/features/chatbot/components/Chat/GradientFade.js +39 -0
  130. package/dist/module/features/chatbot/components/Chat/GradientFade.js.map +1 -0
  131. package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +46 -55
  132. package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
  133. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -1
  134. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  135. package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
  136. package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  137. package/dist/module/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
  138. package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js +34 -0
  139. package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +1 -0
  140. package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  141. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +16 -4
  142. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
  143. package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +17 -36
  144. package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
  145. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +19 -14
  146. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  147. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
  148. package/dist/module/features/chatbot/components/Chatbot.js +28 -6
  149. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  150. package/dist/module/features/chatbot/constants.js +1 -0
  151. package/dist/module/features/chatbot/constants.js.map +1 -1
  152. package/dist/module/features/chatbot/helpers/ttsHighlight.js +23 -0
  153. package/dist/module/features/chatbot/helpers/ttsHighlight.js.map +1 -0
  154. package/dist/module/features/chatbot/helpers.js +19 -2
  155. package/dist/module/features/chatbot/helpers.js.map +1 -1
  156. package/dist/module/features/chatbot/index.js.map +1 -1
  157. package/dist/module/features/chatbot/model/ChatBotModel.js +65 -17
  158. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  159. package/dist/module/features/chatbot/model/ChatBotThreadManager.js +2 -2
  160. package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
  161. package/dist/module/features/chatbot/model/ChatBoxTextManager.js +2 -1
  162. package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
  163. package/dist/module/features/chatbot/model/ChatTTSHighlightModel.js +52 -0
  164. package/dist/module/features/chatbot/model/ChatTTSHighlightModel.js.map +1 -0
  165. package/dist/module/features/chatbot/model/ChatTTSModel.js +149 -0
  166. package/dist/module/features/chatbot/model/ChatTTSModel.js.map +1 -0
  167. package/dist/module/features/chatbot/model/ChatbotApi.js +1 -1
  168. package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
  169. package/dist/module/features/chatbot/model/ChatbotTranslation.js +1 -1
  170. package/dist/module/features/chatbot/model/ChatbotTranslation.js.map +1 -1
  171. package/dist/module/features/chatbot/model/ChatsCacheModel.js +9 -0
  172. package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -1
  173. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  174. package/dist/module/features/chatbot/types/t2s.types.js.map +1 -1
  175. package/dist/module/features/feedback/model/model.js.map +1 -1
  176. package/dist/module/features/feedback/model/sockets.js +8 -5
  177. package/dist/module/features/feedback/model/sockets.js.map +1 -1
  178. package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +3 -3
  179. package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
  180. package/dist/module/features/keyboard/components/BasicLayout/BasicLayout.js +2 -2
  181. package/dist/module/features/keyboard/components/BasicLayout/BasicLayout.js.map +1 -1
  182. package/dist/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.js +4 -4
  183. package/dist/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.js.map +1 -1
  184. package/dist/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js +2 -2
  185. package/dist/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js.map +1 -1
  186. package/dist/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js +4 -4
  187. package/dist/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js.map +1 -1
  188. package/dist/module/features/keyboard/components/Keyboard.js +4 -2
  189. package/dist/module/features/keyboard/components/Keyboard.js.map +1 -1
  190. package/dist/module/features/keyboard/components/KeysList/KeysList.js.map +1 -1
  191. package/dist/module/features/keyboard/components/MainLayout/MainLayout.js +2 -7
  192. package/dist/module/features/keyboard/components/MainLayout/MainLayout.js.map +1 -1
  193. package/dist/module/features/keyboard/components/UnitsLayout/UnitTabs.js +1 -1
  194. package/dist/module/features/keyboard/components/UnitsLayout/helpers.js +2 -1
  195. package/dist/module/features/keyboard/components/UnitsLayout/helpers.js.map +1 -1
  196. package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +27 -6
  197. package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
  198. package/dist/module/features/keyboard/components/UnitsLayout/keyboardGroups.js +9 -1
  199. package/dist/module/features/keyboard/components/UnitsLayout/keyboardGroups.js.map +1 -1
  200. package/dist/module/features/keyboard/components/UnitsLayout/types.js +1 -0
  201. package/dist/module/features/keyboard/components/UnitsLayout/types.js.map +1 -1
  202. package/dist/module/features/keyboard/constants/constants.js +1 -1
  203. package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js +3 -2
  204. package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
  205. package/dist/module/features/keyboard/constants/keyboardLayouts.js +19 -4
  206. package/dist/module/features/keyboard/constants/keyboardLayouts.js.map +1 -1
  207. package/dist/module/features/keyboard/helpers.js +5 -0
  208. package/dist/module/features/keyboard/helpers.js.map +1 -1
  209. package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js +20 -3
  210. package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
  211. package/dist/module/features/keyboard/types/MathKeysGroups/units.js +6 -3
  212. package/dist/module/features/keyboard/types/MathKeysGroups/units.js.map +1 -1
  213. package/dist/module/features/openEnded/components/OpenEndedAttemptsLimit.js +28 -0
  214. package/dist/module/features/openEnded/components/OpenEndedAttemptsLimit.js.map +1 -0
  215. package/dist/module/features/openEnded/components/OpenEndedScoreLabel.js +71 -0
  216. package/dist/module/features/openEnded/components/OpenEndedScoreLabel.js.map +1 -0
  217. package/dist/module/features/openEnded/index.js +7 -0
  218. package/dist/module/features/openEnded/index.js.map +1 -0
  219. package/dist/module/features/openEnded/oe.helpers.js +21 -0
  220. package/dist/module/features/openEnded/oe.helpers.js.map +1 -0
  221. package/dist/module/features/openEnded/oe.types.js +10 -0
  222. package/dist/module/features/openEnded/oe.types.js.map +1 -0
  223. package/dist/module/index.js +1 -0
  224. package/dist/module/index.js.map +1 -1
  225. package/dist/module/lib/components/ConditionalWrapper.js +17 -0
  226. package/dist/module/lib/components/ConditionalWrapper.js.map +1 -0
  227. package/dist/module/shared/common.constants.js +5 -0
  228. package/dist/module/shared/common.constants.js.map +1 -0
  229. package/dist/module/shared/icons/TimeIcon.js +29 -0
  230. package/dist/module/shared/icons/TimeIcon.js.map +1 -0
  231. package/dist/module/shared/icons/keyboard/CDotIcon/CDotIcon.js +4 -4
  232. package/dist/module/shared/icons/keyboard/CDotIcon/CDotIcon.js.map +1 -1
  233. package/dist/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js +24 -0
  234. package/dist/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js.map +1 -0
  235. package/dist/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js +24 -0
  236. package/dist/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js.map +1 -0
  237. package/dist/module/shared/translation/localization/ca.json +4 -2
  238. package/dist/module/shared/translation/localization/de.json +4 -2
  239. package/dist/module/shared/translation/localization/en.json +4 -2
  240. package/dist/module/shared/translation/localization/gb.json +4 -2
  241. package/dist/module/shared/translation/localization/sct.json +4 -2
  242. package/dist/module/shared/translation/localization/sw.json +4 -2
  243. package/dist/module/types/common.types.js +2 -0
  244. package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -1
  245. package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +7 -2
  246. package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
  247. package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts +7 -0
  248. package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts.map +1 -0
  249. package/dist/typescript/commonjs/features/chatbot/components/Chat/GradientFade.d.ts +10 -0
  250. package/dist/typescript/commonjs/features/chatbot/components/Chat/GradientFade.d.ts.map +1 -0
  251. package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -2
  252. package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
  253. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
  254. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +7 -0
  255. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +1 -0
  256. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +4 -2
  257. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  258. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts +4 -2
  259. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
  260. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts +2 -3
  261. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
  262. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  263. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  264. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +5 -1
  265. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  266. package/dist/typescript/commonjs/features/chatbot/constants.d.ts +1 -0
  267. package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
  268. package/dist/typescript/commonjs/features/chatbot/helpers/ttsHighlight.d.ts +8 -0
  269. package/dist/typescript/commonjs/features/chatbot/helpers/ttsHighlight.d.ts.map +1 -0
  270. package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
  271. package/dist/typescript/commonjs/features/chatbot/index.d.ts +3 -2
  272. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  273. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +6 -3
  274. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  275. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +4 -3
  276. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
  277. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
  278. package/dist/typescript/commonjs/features/chatbot/model/ChatTTSHighlightModel.d.ts +25 -0
  279. package/dist/typescript/commonjs/features/chatbot/model/ChatTTSHighlightModel.d.ts.map +1 -0
  280. package/dist/typescript/commonjs/features/chatbot/model/ChatTTSModel.d.ts +38 -0
  281. package/dist/typescript/commonjs/features/chatbot/model/ChatTTSModel.d.ts.map +1 -0
  282. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +1 -0
  283. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
  284. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +28 -16
  285. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  286. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +15 -11
  287. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  288. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +25 -0
  289. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
  290. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +1 -0
  291. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
  292. package/dist/typescript/commonjs/features/feedback/model/model.d.ts +4 -1
  293. package/dist/typescript/commonjs/features/feedback/model/model.d.ts.map +1 -1
  294. package/dist/typescript/commonjs/features/feedback/model/sockets.d.ts.map +1 -1
  295. package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
  296. package/dist/typescript/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.d.ts.map +1 -1
  297. package/dist/typescript/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.d.ts.map +1 -1
  298. package/dist/typescript/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.d.ts.map +1 -1
  299. package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts +2 -1
  300. package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts.map +1 -1
  301. package/dist/typescript/commonjs/features/keyboard/components/MainLayout/MainLayout.d.ts.map +1 -1
  302. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/helpers.d.ts +1 -0
  303. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/helpers.d.ts.map +1 -1
  304. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts +4 -7
  305. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts.map +1 -1
  306. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts +1 -0
  307. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts.map +1 -1
  308. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/types.d.ts +7 -1
  309. package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/types.d.ts.map +1 -1
  310. package/dist/typescript/commonjs/features/keyboard/constants/constants.d.ts +1 -1
  311. package/dist/typescript/commonjs/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
  312. package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts +4 -0
  313. package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
  314. package/dist/typescript/commonjs/features/keyboard/helpers.d.ts +1 -0
  315. package/dist/typescript/commonjs/features/keyboard/helpers.d.ts.map +1 -1
  316. package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +10 -0
  317. package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
  318. package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/units.d.ts +36 -0
  319. package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/units.d.ts.map +1 -1
  320. package/dist/typescript/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.d.ts +7 -0
  321. package/dist/typescript/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.d.ts.map +1 -0
  322. package/dist/typescript/commonjs/features/openEnded/components/OpenEndedScoreLabel.d.ts +12 -0
  323. package/dist/typescript/commonjs/features/openEnded/components/OpenEndedScoreLabel.d.ts.map +1 -0
  324. package/dist/typescript/commonjs/features/openEnded/index.d.ts +5 -0
  325. package/dist/typescript/commonjs/features/openEnded/index.d.ts.map +1 -0
  326. package/dist/typescript/commonjs/features/openEnded/oe.helpers.d.ts +13 -0
  327. package/dist/typescript/commonjs/features/openEnded/oe.helpers.d.ts.map +1 -0
  328. package/dist/typescript/commonjs/features/openEnded/oe.types.d.ts +7 -0
  329. package/dist/typescript/commonjs/features/openEnded/oe.types.d.ts.map +1 -0
  330. package/dist/typescript/commonjs/index.d.ts +1 -0
  331. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  332. package/dist/typescript/commonjs/lib/components/ConditionalWrapper.d.ts +9 -0
  333. package/dist/typescript/commonjs/lib/components/ConditionalWrapper.d.ts.map +1 -0
  334. package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts +1 -1
  335. package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts.map +1 -1
  336. package/dist/typescript/commonjs/shared/common.constants.d.ts +2 -0
  337. package/dist/typescript/commonjs/shared/common.constants.d.ts.map +1 -0
  338. package/dist/typescript/commonjs/shared/icons/TimeIcon.d.ts +4 -0
  339. package/dist/typescript/commonjs/shared/icons/TimeIcon.d.ts.map +1 -0
  340. package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts +4 -0
  341. package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts.map +1 -0
  342. package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts +4 -0
  343. package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts.map +1 -0
  344. package/dist/typescript/commonjs/shared/translation/constants.d.ts +12 -0
  345. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  346. package/dist/typescript/commonjs/shared/translation/model.d.ts +4 -0
  347. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  348. package/dist/typescript/commonjs/types/common.types.d.ts +2 -0
  349. package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
  350. package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -1
  351. package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts +7 -2
  352. package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
  353. package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts +7 -0
  354. package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts.map +1 -0
  355. package/dist/typescript/module/features/chatbot/components/Chat/GradientFade.d.ts +10 -0
  356. package/dist/typescript/module/features/chatbot/components/Chat/GradientFade.d.ts.map +1 -0
  357. package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -2
  358. package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
  359. package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
  360. package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +7 -0
  361. package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +1 -0
  362. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +4 -2
  363. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  364. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts +4 -2
  365. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
  366. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts +2 -3
  367. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
  368. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  369. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  370. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +5 -1
  371. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  372. package/dist/typescript/module/features/chatbot/constants.d.ts +1 -0
  373. package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
  374. package/dist/typescript/module/features/chatbot/helpers/ttsHighlight.d.ts +8 -0
  375. package/dist/typescript/module/features/chatbot/helpers/ttsHighlight.d.ts.map +1 -0
  376. package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
  377. package/dist/typescript/module/features/chatbot/index.d.ts +3 -2
  378. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  379. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +6 -3
  380. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  381. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +4 -3
  382. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
  383. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
  384. package/dist/typescript/module/features/chatbot/model/ChatTTSHighlightModel.d.ts +25 -0
  385. package/dist/typescript/module/features/chatbot/model/ChatTTSHighlightModel.d.ts.map +1 -0
  386. package/dist/typescript/module/features/chatbot/model/ChatTTSModel.d.ts +38 -0
  387. package/dist/typescript/module/features/chatbot/model/ChatTTSModel.d.ts.map +1 -0
  388. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +1 -0
  389. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
  390. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +28 -16
  391. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  392. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +15 -11
  393. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  394. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +25 -0
  395. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
  396. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +1 -0
  397. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
  398. package/dist/typescript/module/features/feedback/model/model.d.ts +4 -1
  399. package/dist/typescript/module/features/feedback/model/model.d.ts.map +1 -1
  400. package/dist/typescript/module/features/feedback/model/sockets.d.ts.map +1 -1
  401. package/dist/typescript/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
  402. package/dist/typescript/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.d.ts.map +1 -1
  403. package/dist/typescript/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.d.ts.map +1 -1
  404. package/dist/typescript/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.d.ts.map +1 -1
  405. package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts +2 -1
  406. package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts.map +1 -1
  407. package/dist/typescript/module/features/keyboard/components/MainLayout/MainLayout.d.ts.map +1 -1
  408. package/dist/typescript/module/features/keyboard/components/UnitsLayout/helpers.d.ts +1 -0
  409. package/dist/typescript/module/features/keyboard/components/UnitsLayout/helpers.d.ts.map +1 -1
  410. package/dist/typescript/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts +4 -7
  411. package/dist/typescript/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts.map +1 -1
  412. package/dist/typescript/module/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts +1 -0
  413. package/dist/typescript/module/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts.map +1 -1
  414. package/dist/typescript/module/features/keyboard/components/UnitsLayout/types.d.ts +7 -1
  415. package/dist/typescript/module/features/keyboard/components/UnitsLayout/types.d.ts.map +1 -1
  416. package/dist/typescript/module/features/keyboard/constants/constants.d.ts +1 -1
  417. package/dist/typescript/module/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
  418. package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts +4 -0
  419. package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
  420. package/dist/typescript/module/features/keyboard/helpers.d.ts +1 -0
  421. package/dist/typescript/module/features/keyboard/helpers.d.ts.map +1 -1
  422. package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +10 -0
  423. package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
  424. package/dist/typescript/module/features/keyboard/types/MathKeysGroups/units.d.ts +36 -0
  425. package/dist/typescript/module/features/keyboard/types/MathKeysGroups/units.d.ts.map +1 -1
  426. package/dist/typescript/module/features/openEnded/components/OpenEndedAttemptsLimit.d.ts +7 -0
  427. package/dist/typescript/module/features/openEnded/components/OpenEndedAttemptsLimit.d.ts.map +1 -0
  428. package/dist/typescript/module/features/openEnded/components/OpenEndedScoreLabel.d.ts +12 -0
  429. package/dist/typescript/module/features/openEnded/components/OpenEndedScoreLabel.d.ts.map +1 -0
  430. package/dist/typescript/module/features/openEnded/index.d.ts +5 -0
  431. package/dist/typescript/module/features/openEnded/index.d.ts.map +1 -0
  432. package/dist/typescript/module/features/openEnded/oe.helpers.d.ts +13 -0
  433. package/dist/typescript/module/features/openEnded/oe.helpers.d.ts.map +1 -0
  434. package/dist/typescript/module/features/openEnded/oe.types.d.ts +7 -0
  435. package/dist/typescript/module/features/openEnded/oe.types.d.ts.map +1 -0
  436. package/dist/typescript/module/index.d.ts +1 -0
  437. package/dist/typescript/module/index.d.ts.map +1 -1
  438. package/dist/typescript/module/lib/components/ConditionalWrapper.d.ts +9 -0
  439. package/dist/typescript/module/lib/components/ConditionalWrapper.d.ts.map +1 -0
  440. package/dist/typescript/module/lib/effector/createControllerEffect.d.ts +1 -1
  441. package/dist/typescript/module/lib/effector/createControllerEffect.d.ts.map +1 -1
  442. package/dist/typescript/module/shared/common.constants.d.ts +2 -0
  443. package/dist/typescript/module/shared/common.constants.d.ts.map +1 -0
  444. package/dist/typescript/module/shared/icons/TimeIcon.d.ts +4 -0
  445. package/dist/typescript/module/shared/icons/TimeIcon.d.ts.map +1 -0
  446. package/dist/typescript/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts +4 -0
  447. package/dist/typescript/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts.map +1 -0
  448. package/dist/typescript/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts +4 -0
  449. package/dist/typescript/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts.map +1 -0
  450. package/dist/typescript/module/shared/translation/constants.d.ts +12 -0
  451. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  452. package/dist/typescript/module/shared/translation/model.d.ts +4 -0
  453. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  454. package/dist/typescript/module/types/common.types.d.ts +2 -0
  455. package/dist/typescript/module/types/common.types.d.ts.map +1 -1
  456. package/package.json +3 -1
  457. package/src/features/celebrations/helpers.ts +35 -33
  458. package/src/features/chatbot/TTS_HIGHLIGHTING.md +120 -0
  459. package/src/features/chatbot/components/Chat/Chat.tsx +301 -57
  460. package/src/features/chatbot/components/Chat/CloseButton.tsx +31 -0
  461. package/src/features/chatbot/components/Chat/GradientFade.tsx +43 -0
  462. package/src/features/chatbot/components/ChatControls/ChatControls.tsx +47 -60
  463. package/src/features/chatbot/components/ChatInput/ChatInput.tsx +2 -1
  464. package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +2 -2
  465. package/src/features/chatbot/components/ChatInput/FreeText/SendMessageButton.tsx +1 -1
  466. package/src/features/chatbot/components/ChatMessage/AnimatedMessage.tsx +30 -0
  467. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +4 -2
  468. package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +25 -3
  469. package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +17 -33
  470. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +17 -12
  471. package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +1 -1
  472. package/src/features/chatbot/components/Chatbot.tsx +30 -3
  473. package/src/features/chatbot/constants.ts +2 -0
  474. package/src/features/chatbot/helpers/ttsHighlight.ts +25 -0
  475. package/src/features/chatbot/helpers.ts +14 -1
  476. package/src/features/chatbot/index.ts +17 -2
  477. package/src/features/chatbot/model/ChatBotModel.ts +74 -16
  478. package/src/features/chatbot/model/ChatBotThreadManager.ts +12 -4
  479. package/src/features/chatbot/model/ChatBoxTextManager.ts +1 -0
  480. package/src/features/chatbot/model/ChatTTSHighlightModel.ts +64 -0
  481. package/src/features/chatbot/model/ChatTTSModel.ts +168 -0
  482. package/src/features/chatbot/model/ChatbotApi.ts +1 -1
  483. package/src/features/chatbot/model/ChatbotTranslation.ts +1 -1
  484. package/src/features/chatbot/model/ChatsCacheModel.ts +11 -0
  485. package/src/features/chatbot/types/api.types.ts +25 -19
  486. package/src/features/chatbot/types/model.types.ts +24 -12
  487. package/src/features/chatbot/types/t2s.types.ts +33 -0
  488. package/src/features/chatbot/types/units.types.ts +1 -0
  489. package/src/features/feedback/model/model.ts +4 -1
  490. package/src/features/feedback/model/sockets.ts +8 -6
  491. package/src/features/keyboard/components/AlgebraLayout/AlgebraLayout.tsx +4 -3
  492. package/src/features/keyboard/components/BasicLayout/BasicLayout.tsx +2 -2
  493. package/src/features/keyboard/components/BasicPlusLayout/keyboardGroups.ts +27 -17
  494. package/src/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.tsx +3 -2
  495. package/src/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.ts +30 -24
  496. package/src/features/keyboard/components/Keyboard.tsx +14 -4
  497. package/src/features/keyboard/components/KeysList/KeysList.tsx +1 -1
  498. package/src/features/keyboard/components/MainLayout/MainLayout.tsx +2 -6
  499. package/src/features/keyboard/components/UnitsLayout/UnitTabs.tsx +1 -1
  500. package/src/features/keyboard/components/UnitsLayout/helpers.tsx +3 -0
  501. package/src/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.ts +36 -22
  502. package/src/features/keyboard/components/UnitsLayout/keyboardGroups.ts +11 -0
  503. package/src/features/keyboard/components/UnitsLayout/types.ts +7 -0
  504. package/src/features/keyboard/constants/constants.ts +1 -1
  505. package/src/features/keyboard/constants/keyboardGroupsByLocale.ts +2 -0
  506. package/src/features/keyboard/constants/keyboardLayouts.ts +18 -1
  507. package/src/features/keyboard/helpers.ts +6 -0
  508. package/src/features/keyboard/types/MathKeysGroups/basicOperators.tsx +15 -3
  509. package/src/features/keyboard/types/MathKeysGroups/units.tsx +3 -0
  510. package/src/features/openEnded/components/OpenEndedAttemptsLimit.tsx +26 -0
  511. package/src/features/openEnded/components/OpenEndedScoreLabel.tsx +81 -0
  512. package/src/features/openEnded/index.ts +4 -0
  513. package/src/features/openEnded/oe.helpers.ts +31 -0
  514. package/src/features/openEnded/oe.types.ts +6 -0
  515. package/src/index.ts +1 -0
  516. package/src/lib/components/ConditionalWrapper.tsx +15 -0
  517. package/src/lib/effector/createControllerEffect.ts +1 -1
  518. package/src/shared/common.constants.ts +3 -0
  519. package/src/shared/icons/TimeIcon.tsx +23 -0
  520. package/src/shared/icons/keyboard/CDotIcon/CDotIcon.tsx +2 -2
  521. package/src/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.tsx +18 -0
  522. package/src/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.tsx +18 -0
  523. package/src/shared/translation/localization/ca.json +4 -2
  524. package/src/shared/translation/localization/de.json +4 -2
  525. package/src/shared/translation/localization/en.json +4 -2
  526. package/src/shared/translation/localization/gb.json +4 -2
  527. package/src/shared/translation/localization/sct.json +4 -2
  528. package/src/shared/translation/localization/sw.json +4 -2
  529. package/src/types/common.types.ts +4 -0
  530. package/dist/commonjs/features/chatbot/model/t2s.js +0 -107
  531. package/dist/commonjs/features/chatbot/model/t2s.js.map +0 -1
  532. package/dist/module/features/chatbot/model/t2s.js +0 -102
  533. package/dist/module/features/chatbot/model/t2s.js.map +0 -1
  534. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +0 -34
  535. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +0 -1
  536. package/dist/typescript/module/features/chatbot/model/t2s.d.ts +0 -34
  537. package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +0 -1
  538. package/src/features/chatbot/model/t2s.ts +0 -123
@@ -13,7 +13,10 @@ const isDateInRange = (currentDate, startDateStr, endDateStr) => {
13
13
  const [endDay, endMonth] = endDateStr.split('-').map(Number);
14
14
  const currentYear = currentDate.getFullYear();
15
15
  const startDate = new Date(currentYear, startMonth - 1, startDay);
16
- const endDate = new Date(currentYear, endMonth - 1, endDay + 1);
16
+
17
+ // If end month is earlier than start month, it spans to next year
18
+ const endYear = endMonth < startMonth ? currentYear + 1 : currentYear;
19
+ const endDate = new Date(endYear, endMonth - 1, endDay + 1);
17
20
  return currentDate >= startDate && currentDate <= endDate;
18
21
  };
19
22
  const getIconForCurrentDate = () => {
@@ -1 +1 @@
1
- {"version":3,"names":["_Spark","require","_config","randomRange","min","max","Math","random","exports","isDateInRange","currentDate","startDateStr","endDateStr","startDay","startMonth","split","map","Number","endDay","endMonth","currentYear","getFullYear","startDate","Date","endDate","getIconForCurrentDate","celebration","CELEBRATION_ICON_CONFIG","activePeriod","start","end","Icon","MainIcon","generateParticle","variant","elementsCount","angle","rotation","sparkSize","mainSize","velocityMultiplier","friction","life","angularAcceleration","speedRange","CELEBRATION_VARIANTS","sparkSpeedMin","spark","sparkSpeedMax","mainSpeedMin","main","mainSpeedMax","particles","i","randomAngle","from","PI","to","randomSpeed","randomAngularAcceleration","push","id","size","type","velocity","x","cos","y","sin","rotationSpeed","Component","Spark","star"],"sourceRoot":"../../../../src","sources":["features/celebrations/helpers.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAGO,MAAME,WAAW,GAAGA,CAACC,GAAW,EA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GAAGI;MAC7B,CAAC;MACDrB,QAAQ,EAAElC,WAAW,CAACkC,QAAQ,CAACkB,IAAI,EAAElB,QAAQ,CAACoB,EAAE,CAAC;MACjDY,aAAa,EAAElE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;MACjCwC,mBAAmB,EAAEgB,yBAAyB;MAC9ClB,QAAQ;MACR6B,SAAS,EAAEtC,QAAQ;MACnBU;IACF,CAAC,CAAC;EACJ;EAEA,OAAOU,SAAS;AAClB,CAAC;AAAC5C,OAAA,CAAAyB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_Spark","require","_config","randomRange","min","max","Math","random","exports","isDateInRange","currentDate","startDateStr","endDateStr","startDay","startMonth","split","map","Number","endDay","endMonth","currentYear","getFullYear","startDate","Date","endYear","endDate","getIconForCurrentDate","celebration","CELEBRATION_ICON_CONFIG","activePeriod","start","end","Icon","MainIcon","generateParticle","variant","elementsCount","angle","rotation","sparkSize","mainSize","velocityMultiplier","friction","life","angularAcceleration","speedRange","CELEBRATION_VARIANTS","sparkSpeedMin","spark","sparkSpeedMax","mainSpeedMin","main","mainSpeedMax","particles","i","randomAngle","from","PI","to","randomSpeed","randomAngularAcceleration","push","id","size","type","velocity","x","cos","y","sin","rotationSpeed","Component","Spark","star"],"sourceRoot":"../../../../src","sources":["features/celebrations/helpers.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAGO,MAAME,WAAW,GAAGA,CAACC,GAAW,EAAEC,GAAW,KAAKC,IAAI,CAACC,MAAM,CAAC,CAAC,IAAIF,GAAG,GAAGD,GAAG,CAAC,GAAGA,GAAG;AAAAI,OAAA,CAAAL,WAAA,GAAAA,WAAA;AAE1F,MAAMM,aAAa,GAAGA,CAACC,WAAiB,EAAEC,YAAoB,EAAEC,UAAkB,KAAK;EACrF,MAAM,CAACC,QAAQ,EAAEC,UAAU,CAAC,GAAGH,YAAY,CA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AC;MACjCyC,mBAAmB,EAAEgB,yBAAyB;MAC9ClB,QAAQ;MACR6B,SAAS,EAAEtC,QAAQ;MACnBU;IACF,CAAC,CAAC;EACJ;EAEA,OAAOU,SAAS;AAClB,CAAC;AAAA7C,OAAA,CAAA0B,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -0,0 +1,120 @@
1
+ # TTS Word-by-Word Highlighting
2
+
3
+ ## Overview
4
+
5
+ Word-by-word text highlighting synchronized with text-to-speech playback in the chatbot. The feature is optional and enabled via `isWordHighlightEnabled` config flag.
6
+
7
+ ## How It Works
8
+
9
+ ```
10
+ ┌─────────────────────────────────────────────────────────────────┐
11
+ │ 1. User clicks TTS button on a message │
12
+ │ ↓ │
13
+ │ 2. Text is converted to SSML with word marks │
14
+ │ "Hello world" → <speak><mark name="w_0"/>Hello │
15
+ │ <mark name="w_1"/>world</speak> │
16
+ │ ↓ │
17
+ │ 3. Google TTS API returns audio + timepoints │
18
+ │ [{ markName: "w_0", timeSeconds: 0.0 }, │
19
+ │ { markName: "w_1", timeSeconds: 0.5 }] │
20
+ │ ↓ │
21
+ │ 4. Audio plays, onTimeUpdate fires via RAF loop │
22
+ │ ↓ │
23
+ │ 5. Current time → find matching timepoint → word index │
24
+ │ ↓ │
25
+ │ 6. $highlightedWordIndex updates → UI re-renders highlighted │
26
+ └─────────────────────────────────────────────────────────────────┘
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ ```tsx
32
+ // In students-web model setup
33
+ chatModel.bot.setUpT2S({
34
+ audioProvider: createT2SAudioProvider(),
35
+ textSanitizer: removeKatexPartFromTextToSpeech,
36
+ isWordHighlightEnabled: true,
37
+ })
38
+ ```
39
+
40
+ ## Architecture
41
+
42
+ ### ChatTTSModel (ChatTTSModel.ts)
43
+
44
+ Handles TTS playback and word highlighting. Key design decisions:
45
+
46
+ - **Map-based cache** — `audioCache: Map<string, AudioCache>` stores both `audioPath` and `timepoints` per message. When highlighting is off, `timepoints` is `[]`. Cache lives for the model's lifetime (cleared when user leaves the problem).
47
+ - **`fetchAudio()` method** — encapsulates API call + audioContent decoding. Highlight vs non-highlight differences are ternaries (SSML vs plain text, `enableTimePointing`).
48
+ - **`play()` is linear** — cache lookup → fetch if miss → store → activate highlight if enabled → play audio. No branching between highlight/non-highlight paths.
49
+ - **Pause/resume guards** — `wordHighlightEnabled` check before toggling `setIsActive(false)`/`setIsActive(true)` on pause/resume.
50
+ - **`wordHighlightEnabled` (private)** — stored result of `!!isWordHighlightEnabled && !!audioProvider.onTimeUpdate`. Set once at `setConfig`.
51
+ - **`isWordHighlightEnabled` (public getter)** — read-only access for external consumers (e.g. `Chat.tsx`).
52
+
53
+ ### AudioProvider type
54
+
55
+ ```typescript
56
+ type AudioProvider = {
57
+ play: (audioPath: string, onPlaybackComplete: () => void) => Promise<void>
58
+ pause: () => void
59
+ resume: () => void
60
+ stop: () => void
61
+ onTimeUpdate?: OnTimeUpdate // optional — presence enables highlight capability
62
+ }
63
+ ```
64
+
65
+ `onTimeUpdate` is optional. It's the mechanism that syncs audio playback time with word highlights via a RAF loop. If the provider doesn't have it, highlighting won't activate even if `isWordHighlightEnabled: true`.
66
+
67
+ ### ChatTTSHighlightModel (ChatTTSHighlightModel.ts)
68
+
69
+ Manages highlight state using Effector stores with declarative reset. Receives `OnTimeUpdate` callback directly (not the whole `AudioProvider`).
70
+
71
+ - **`$isActive`** — gates `$highlightedWordIndex` computation. Toggled on pause/resume without resetting timepoints.
72
+ - **`$highlightedWordIndex`** — derived store, returns `-1` when inactive or no match. Parses mark name via `WORD_MARK_REGEX`.
73
+ - **`activate(timepoints, onTimeUpdate)`** — sets timepoints, enables highlighting, registers time update callback. Only triggers store updates when the highlighted word actually changes (`lastMark` comparison).
74
+ - **`deactivate(onTimeUpdate)`** — stops listening, resets all state via declarative `.reset()` chain.
75
+ - **All stores use `.reset(this.reset)`** — single `reset` event clears `$time`, `$timepoints`, and `$isActive`.
76
+
77
+ ### Helpers (helpers/ttsHighlight.ts)
78
+
79
+ - **`textToSSML(text)`** — converts plain text to SSML with `<mark>` tags for word timing.
80
+ - **`findCurrentMark(timepoints, time)`** — iterates backwards through timepoints to find the current mark. Efficient for linear playback.
81
+
82
+ ### Constants (constants.ts)
83
+
84
+ - **`WORD_MARK_REGEX`** — `/^w_(\d+)$/` — extracts word index from mark names like `w_0`, `w_1`.
85
+
86
+ ### Naming conventions
87
+
88
+ | Name | Scope | Purpose |
89
+ |------|-------|---------|
90
+ | `wordHighlight` | public instance | `ChatTTSHighlightModel` instance on `ChatTTSModel` |
91
+ | `wordHighlightEnabled` | private field | Whether highlighting is active (set once at config) |
92
+ | `isWordHighlightEnabled` | public getter | Read-only access to `wordHighlightEnabled` for external consumers |
93
+ | `isWordHighlightEnabled` | T2SConfig field | Config flag passed to `setUpT2S()` |
94
+
95
+ ## Data Flow
96
+
97
+ ```
98
+ AudioProvider.onTimeUpdate(callback)
99
+
100
+ ChatTTSHighlightModel.activate(timepoints, onTimeUpdate)
101
+
102
+ RAF loop → audio.currentTime → findCurrentMark() → only updates when mark changes
103
+
104
+ $highlightedWordIndex = parse mark name "w_N" → N (or -1 if inactive/no match)
105
+
106
+ Chat.tsx: model.t2s.isWordHighlightEnabled && isPlayingMessage ? highlightedWordIndex : -1
107
+
108
+ ChatMessage → MessageContent → TTSHighlightRenderer({ text, highlightedIndex })
109
+ ```
110
+
111
+ ## Key Files
112
+
113
+ | File | Purpose |
114
+ |------|---------|
115
+ | `model/ChatTTSModel.ts` | `ChatTTSModel` — TTS playback, caching, highlight orchestration |
116
+ | `model/ChatTTSHighlightModel.ts` | Highlight state — timepoints, current time, `$isActive`, derived word index |
117
+ | `helpers/ttsHighlight.ts` | `textToSSML` + `findCurrentMark` — SSML conversion and playback position lookup |
118
+ | `constants.ts` | `WORD_MARK_REGEX` and audio config defaults |
119
+ | `types/t2s.types.ts` | `AudioProvider`, `OnTimeUpdate`, `AudioStatus`, `AudioCache`, `TTSHighlightRendererProps` types |
120
+ | `components/Chat/Chat.tsx` | Reads `isWordHighlightEnabled` and `$highlightedWordIndex`, passes to messages |
@@ -7,96 +7,280 @@ exports.Chat = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _effectorReact = require("effector-react");
10
+ var _reactNativeUi = require("@magmamath/react-native-ui");
11
+ var _ChatbotIcon = require("../../../../shared/icons/ChatbotIcon.js");
12
+ var _LavaIconInGlasses = require("../../../../shared/icons/LavaIconInGlasses.js");
13
+ var _AnimatedMessage = require("../ChatMessage/AnimatedMessage.js");
10
14
  var _ChatMessage = require("../ChatMessage/ChatMessage.js");
11
15
  var _MessageLoader = require("../ChatMessage/MessageLoader.js");
12
16
  var _ChatInput = require("../ChatInput/ChatInput.js");
17
+ var _CloseButton = require("./CloseButton.js");
13
18
  var _modelTypes = require("../../types/model.types.js");
14
19
  var _styleTypes = require("../../types/style.types.js");
20
+ var _ConditionalWrapper = require("../../../../lib/components/ConditionalWrapper.js");
15
21
  var _jsxRuntime = require("react/jsx-runtime");
16
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
+ const SCROLL_BOTTOM_THRESHOLD = 1;
18
25
  const TOOLBAR_HEIGHT = 140;
19
26
  const BOTTOM_OFFSET = _reactNative.Platform.select({
20
27
  web: 265,
21
28
  default: 294
22
29
  });
30
+ const TOP_FADE_MASK = _reactNative.Platform.select({
31
+ web: {
32
+ maskImage: 'linear-gradient(to top, transparent, black 10%, black)'
33
+ },
34
+ default: undefined
35
+ });
36
+ const Separator = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
37
+ style: styles.separator
38
+ });
39
+ const BottomFade = ({
40
+ visible
41
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
42
+ style: [styles.bottomFade, {
43
+ opacity: visible ? 1 : 0
44
+ }],
45
+ pointerEvents: "none"
46
+ });
47
+ const ChatIcon = ({
48
+ isLoading
49
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
50
+ style: styles.iconAbsolute,
51
+ children: isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_LavaIconInGlasses.LavaIconInGlasses, {
52
+ width: 53,
53
+ height: 73
54
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatbotIcon.ChatbotIcon, {
55
+ width: 53,
56
+ height: 73,
57
+ color: 'blue'
58
+ })
59
+ });
60
+ const ChatFooter = ({
61
+ isHintFeedback,
62
+ isInputDisabled,
63
+ colorScheme,
64
+ hasMessages,
65
+ onPressClose
66
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
67
+ style: styles.inputRow,
68
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CloseButton.CloseButton, {
69
+ onPress: onPressClose
70
+ }), !isInputDisabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatInput.ChatInput, {
71
+ isHintFeedback: isHintFeedback,
72
+ colorScheme: colorScheme,
73
+ hasMessages: hasMessages
74
+ })]
75
+ });
23
76
  const Chat = ({
24
77
  model,
25
78
  isHintFeedback,
26
79
  isTextToSpeechEnabled,
27
- colorScheme = _styleTypes.ColorScheme.Blue
80
+ isInputDisabled,
81
+ colorScheme = _styleTypes.ColorScheme.Blue,
82
+ MessageWrapper,
83
+ TTSHighlightRenderer,
84
+ onPressClose
28
85
  }) => {
29
- const dimensions = (0, _reactNative.useWindowDimensions)();
30
86
  const ref = (0, _react.useRef)(null);
87
+ const maxHeightRef = (0, _react.useRef)(0);
88
+ const dimensions = (0, _reactNative.useWindowDimensions)();
31
89
  const isOpen = (0, _effectorReact.useUnit)(model.$isOpen);
32
90
  const isHelpRequestPending = (0, _effectorReact.useUnit)(model.sendHelpRequestFx.pending);
33
91
  const isTextToSpeechPending = (0, _effectorReact.useUnit)(model.api.textToSpeechTextFx.pending);
92
+ const audioStatus = (0, _effectorReact.useUnit)(model.t2s.$status);
34
93
  const currentPlayingId = (0, _effectorReact.useUnit)(model.t2s.$currentPlayingId);
94
+ const highlightedWordIndex = (0, _effectorReact.useUnit)(model.t2s.wordHighlight.$highlightedWordIndex);
35
95
  const isTranslated = (0, _effectorReact.useUnit)(model.translation.$isTranslated);
36
- const audioStatus = (0, _effectorReact.useUnit)(model.t2s.$status);
37
96
  const errorSpottingEnabled = (0, _effectorReact.useUnit)(model.errorSpotting.$isEnabled);
38
97
  const messages = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
39
98
  messages
40
99
  }) => messages);
41
- const lastMessageId = messages.at(-1)?.id;
100
+ const lastBotMessageId = messages.findLast(m => !m.isOwnMessage)?.id;
42
101
  const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET;
43
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
102
+ maxHeightRef.current = MAX_HEIGHT;
103
+ const [isScrollable, setIsScrollable] = (0, _react.useState)(false);
104
+ const [showBottomFade, setShowBottomFade] = (0, _react.useState)(false);
105
+ (0, _react.useEffect)(() => {
106
+ if (!isOpen) {
107
+ setIsScrollable(false);
108
+ setShowBottomFade(false);
109
+ }
110
+ }, [isOpen]);
111
+ const handleScroll = (0, _react.useCallback)(e => {
112
+ const {
113
+ contentOffset
114
+ } = e.nativeEvent;
115
+ setShowBottomFade(contentOffset.y > SCROLL_BOTTOM_THRESHOLD);
116
+ }, []);
117
+ const handleContentSizeChange = (0, _react.useCallback)((_, contentHeight) => {
118
+ setIsScrollable(contentHeight >= maxHeightRef.current);
119
+ }, []);
120
+ const shouldWrapMessage = MessageWrapper && isInputDisabled && messages.length === 1;
121
+ const reversedMessages = (0, _react.useMemo)(() => [...messages].reverse(), [messages]);
122
+ const showAbsoluteIcon = !showBottomFade && !isInputDisabled;
123
+ const renderMessage = (0, _react.useCallback)(({
124
+ item: message
125
+ }) => {
126
+ const isPlayingMessage = message.id === currentPlayingId;
127
+ const messageHighlightIndex = model.t2s.isWordHighlightEnabled && isPlayingMessage ? highlightedWordIndex : -1;
128
+ const showInlineIcon = showBottomFade && !message.isOwnMessage && message.id === lastBotMessageId;
129
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(MessageItem, {
130
+ message: message,
131
+ showInlineIcon: showInlineIcon,
132
+ animate: !isInputDisabled,
133
+ shouldWrapMessage: !!shouldWrapMessage,
134
+ MessageWrapper: MessageWrapper,
135
+ isTranslated: isTranslated,
136
+ colorScheme: colorScheme,
137
+ withIcon: isInputDisabled,
138
+ withErrorSpotting: errorSpottingEnabled && !message.isOwnMessage,
139
+ highlightedWordIndex: messageHighlightIndex,
140
+ TTSHighlightRenderer: TTSHighlightRenderer,
141
+ isTextToSpeechEnabled: isTextToSpeechEnabled && !message.isOwnMessage,
142
+ isPlayingMessage: isPlayingMessage,
143
+ isTextToSpeechPending: isTextToSpeechPending,
144
+ audioStatus: audioStatus
145
+ });
146
+ }, [currentPlayingId, highlightedWordIndex, showBottomFade, lastBotMessageId, shouldWrapMessage, isTranslated, colorScheme, errorSpottingEnabled, isTextToSpeechEnabled, isTextToSpeechPending, audioStatus]);
147
+ if (!isOpen) return null;
148
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
44
149
  style: [styles.container, {
45
150
  maxHeight: MAX_HEIGHT
46
151
  }],
47
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
152
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
48
153
  ref: ref,
154
+ inverted: true,
49
155
  bounces: false,
156
+ style: [styles.flatList, isScrollable && TOP_FADE_MASK],
157
+ data: reversedMessages,
158
+ keyExtractor: keyExtractor,
159
+ renderItem: renderMessage,
50
160
  contentContainerStyle: styles.list,
51
- onContentSizeChange: (_, height) => {
52
- ref.current?.scrollToEnd();
53
- if (height >= MAX_HEIGHT) {
54
- model.setScrollActive(true);
55
- }
56
- },
57
- children: [isOpen && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
58
- style: styles.gap,
59
- children: [messages.map(message => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatMessage.ChatMessage, {
60
- isTranslated: isTranslated,
61
- withIcon: !message.isOwnMessage && message.id === lastMessageId,
62
- message: message,
63
- variant: message.isOwnMessage ? _modelTypes.MessageVariant.SENT : _modelTypes.MessageVariant.RECEIVED,
64
- colorScheme: colorScheme,
65
- withErrorSpotting: errorSpottingEnabled && !message.isOwnMessage,
66
- t2sState: {
67
- isEnabled: isTextToSpeechEnabled && !message.isOwnMessage,
68
- isActive: message.id === currentPlayingId,
69
- isLoading: isTextToSpeechPending,
70
- status: audioStatus,
71
- disabled: isTextToSpeechPending
72
- }
73
- }, message.id)), isHelpRequestPending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageLoader.MessageLoader, {
74
- colorScheme: colorScheme
75
- })]
76
- }), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatInput.ChatInput, {
77
- isHintFeedback: isHintFeedback,
78
- colorScheme: colorScheme,
79
- hasMessages: messages.length > 1
80
- })]
81
- })
161
+ onScroll: handleScroll,
162
+ scrollEventThrottle: 16,
163
+ onContentSizeChange: handleContentSizeChange,
164
+ ListHeaderComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageLoader.MessageLoader, {
165
+ isLoading: isHelpRequestPending
166
+ }),
167
+ ItemSeparatorComponent: Separator
168
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(BottomFade, {
169
+ visible: showBottomFade
170
+ }), showAbsoluteIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(ChatIcon, {
171
+ isLoading: isHelpRequestPending
172
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ChatFooter, {
173
+ isHintFeedback: isHintFeedback,
174
+ isInputDisabled: isInputDisabled,
175
+ colorScheme: colorScheme,
176
+ hasMessages: messages.length > 1,
177
+ onPressClose: onPressClose
178
+ })]
82
179
  });
83
180
  };
84
181
  exports.Chat = Chat;
182
+ const keyExtractor = (item, index) => `${item.id}-${index}`;
183
+ const MessageItem = ({
184
+ message,
185
+ showInlineIcon,
186
+ animate,
187
+ shouldWrapMessage,
188
+ MessageWrapper,
189
+ isTranslated,
190
+ colorScheme,
191
+ withIcon,
192
+ withErrorSpotting,
193
+ highlightedWordIndex,
194
+ TTSHighlightRenderer,
195
+ isTextToSpeechEnabled,
196
+ isPlayingMessage,
197
+ isTextToSpeechPending,
198
+ audioStatus
199
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
200
+ style: [styles.messageItem, showInlineIcon && styles.messageWithIcon],
201
+ children: [showInlineIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
202
+ style: styles.inlineIcon,
203
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatbotIcon.ChatbotIcon, {
204
+ width: 53,
205
+ height: 73
206
+ })
207
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedMessage.AnimatedMessage, {
208
+ animate: animate,
209
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConditionalWrapper.ConditionalWrapper, {
210
+ withWrapper: shouldWrapMessage,
211
+ Wrapper: MessageWrapper,
212
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatMessage.ChatMessage, {
213
+ withIcon: withIcon,
214
+ isTranslated: isTranslated,
215
+ message: message,
216
+ variant: message.isOwnMessage ? _modelTypes.MessageVariant.SENT : _modelTypes.MessageVariant.RECEIVED,
217
+ colorScheme: colorScheme,
218
+ withErrorSpotting: withErrorSpotting,
219
+ highlightedWordIndex: highlightedWordIndex,
220
+ TTSHighlightRenderer: TTSHighlightRenderer,
221
+ t2sState: {
222
+ isEnabled: isTextToSpeechEnabled,
223
+ isActive: isPlayingMessage,
224
+ isLoading: isTextToSpeechPending,
225
+ status: audioStatus,
226
+ disabled: isTextToSpeechPending
227
+ }
228
+ })
229
+ })
230
+ })]
231
+ });
85
232
  const styles = _reactNative.StyleSheet.create({
86
233
  container: {
87
234
  flex: 1,
88
235
  alignItems: 'flex-end',
89
- width: 378,
90
- height: '100%'
236
+ width: 374,
237
+ height: '100%',
238
+ paddingRight: _reactNativeUi.SPACING['100']
239
+ },
240
+ flatList: {
241
+ alignSelf: 'stretch',
242
+ paddingTop: _reactNativeUi.SPACING['300']
91
243
  },
92
244
  list: {
93
- alignItems: 'flex-end',
94
- paddingVertical: 2,
95
- paddingRight: 6
245
+ paddingVertical: 2
96
246
  },
97
- gap: {
98
- flex: 1,
99
- gap: 8
247
+ inputRow: {
248
+ flexDirection: 'row',
249
+ alignItems: 'center',
250
+ gap: _reactNativeUi.SPACING['200'],
251
+ minHeight: 52
252
+ },
253
+ bottomFade: {
254
+ position: 'absolute',
255
+ bottom: 52,
256
+ right: 0,
257
+ width: 370,
258
+ height: 40,
259
+ transition: 'opacity 0.2s ease-in-out',
260
+ ..._reactNative.Platform.select({
261
+ web: {
262
+ backgroundImage: 'linear-gradient(to top, rgba(255,255,255,1) 10%, rgba(255,255,255,0.8) 40%, transparent 100%)'
263
+ },
264
+ default: {}
265
+ })
266
+ },
267
+ iconAbsolute: {
268
+ position: 'absolute',
269
+ bottom: 65,
270
+ left: 4
271
+ },
272
+ messageItem: {
273
+ alignSelf: 'flex-end'
274
+ },
275
+ messageWithIcon: {
276
+ flexDirection: 'row',
277
+ alignItems: 'flex-end'
278
+ },
279
+ inlineIcon: {
280
+ marginRight: 8
281
+ },
282
+ separator: {
283
+ height: _reactNativeUi.SPACING['200']
100
284
  }
101
285
  });
102
286
  //# sourceMappingURL=Chat.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_ChatInput","_modelTypes","_styleTypes","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TOOLBAR_HEIGHT","BOTTOM_OFFSET","Platform","select","web","Chat","model","isHintFeedback","isTextToSpeechEnabled","colorScheme","ColorScheme","Blue","dimensions","useWindowDimensions","ref","useRef","isOpen","useUnit","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","errorSpottingEnabled","errorSpotting","$isEnabled","messages","useStoreMap","$currentChatData","lastMessageId","at","id","MAX_HEIGHT","height","jsx","View","style","styles","container","maxHeight","children","jsxs","ScrollView","bounces","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","message","ChatMessage","withIcon","isOwnMessage","variant","MessageVariant","SENT","RECEIVED","withErrorSpotting","t2sState","isEnabled","isActive","isLoading","status","disabled","MessageLoader","ChatInput","hasMessages","length","exports","StyleSheet","create","flex","alignItems","width","paddingVertical","paddingRight"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/Chat/Chat.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAGA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO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AE7C,WAAW;YACnB8C,QAAQ,EAAEvD;UACZ;QAAE,GAbGyC,OAAO,CAACtB,EAcd,CACF,CAAC,EAEDtB,oBAAoB,iBAAI,IAAAxC,WAAA,CAAAiE,GAAA,EAACrE,cAAA,CAAAuG,aAAa;UAACrE,WAAW,EAAEA;QAAY,CAAE,CAAC;MAAA,CAChE,CACP,EAEAO,MAAM,iBACL,IAAArC,WAAA,CAAAiE,GAAA,EAACpE,UAAA,CAAAuG,SAAS;QACRxE,cAAc,EAAEA,cAAe;QAC/BE,WAAW,EAAEA,WAAY;QACzBuE,WAAW,EAAE5C,QAAQ,CAAC6C,MAAM,GAAG;MAAE,CAClC,CACF;IAAA,CACS;EAAC,CACT,CAAC;AAEX,CAAC;AAAAC,OAAA,CAAA7E,IAAA,GAAAA,IAAA;AAED,MAAM0C,MAAM,GAAGoC,uBAAU,CAACC,MAAM,CAAC;EAC/BpC,SAAS,EAAE;IACTqC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,UAAU;IACtBC,KAAK,EAAE,GAAG;IACV5C,MAAM,EAAE;EACV,CAAC;EACDY,IAAI,EAAE;IACJ+B,UAAU,EAAE,UAAU;IACtBE,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE;EAChB,CAAC;EACD5B,GAAG,EAAE;IACHwB,IAAI,EAAE,CAAC;IACPxB,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_reactNativeUi","_ChatbotIcon","_LavaIconInGlasses","_AnimatedMessage","_ChatMessage","_MessageLoader","_ChatInput","_CloseButton","_modelTypes","_styleTypes","_ConditionalWrapper","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SCROLL_BOTTOM_THRESHOLD","TOOLBAR_HEIGHT","BOTTOM_OFFSET","Platform","select","web","TOP_FADE_MASK","maskImage","undefined","Separator","jsx","View","style","styles","separator","BottomFade","visible","bottomFade","opacity","pointerEvents","ChatIcon","isLoading","iconAbsolute","children","LavaIconInGlasses","width","height","ChatbotIcon","color","ChatFooter","isHintFeedback","isInputDisabled","colorScheme","hasMessages","onPressClose","jsxs","inputRow","CloseButton","onPress","ChatInput","Chat","model","isTextToSpeechEnabled","ColorScheme","Blue","MessageWrapper","TTSHighlightRenderer","ref","useRef","maxHeightRef","dimensions","useWindowDimensions","isOpen","useUnit","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","audioStatus","t2s","$status","currentPlayingId","$currentPlayingId","highlightedWordIndex","wordHighlight","$highlightedWordIndex","isTranslated","translation","$isTranslated","errorSpottingEnabled","errorSpotting","$isEnabled","messages","useStoreMap","$currentChatData","lastBotMessageId","findLast","m","isOwnMessage","id","MAX_HEIGHT","current","isScrollable","setIsScrollable","useState","showBottomFade","setShowBottomFade","useEffect","handleScroll","useCallback","contentOffset","nativeEvent","y","handleContentSizeChange","_","contentHeight","shouldWrapMessage","length","reversedMessages","useMemo","reverse","showAbsoluteIcon","renderMessage","item","message","isPlayingMessage","messageHighlightIndex","isWordHighlightEnabled","showInlineIcon","MessageItem","animate","withIcon","withErrorSpotting","container","maxHeight","FlatList","inverted","bounces","flatList","data","keyExtractor","renderItem","contentContainerStyle","list","onScroll","scrollEventThrottle","onContentSizeChange","ListHeaderComponent","MessageLoader","ItemSeparatorComponent","exports","index","messageItem","messageWithIcon","inlineIcon","AnimatedMessage","ConditionalWrapper","withWrapper","Wrapper","ChatMessage","variant","MessageVariant","SENT","RECEIVED","t2sState","isEnabled","isActive","status","disabled","StyleSheet","create","flex","alignItems","paddingRight","SPACING","alignSelf","paddingTop","paddingVertical","flexDirection","gap","minHeight","position","bottom","right","transition","backgroundImage","left","marginRight"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/Chat/Chat.tsx"],"mappings":";;;;;;AAAA,IAAAA,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,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CloseButton = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeUi = require("@magmamath/react-native-ui");
10
+ var _CloseIcon = require("../../../../shared/icons/CloseIcon.js");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ const CloseButton = ({
14
+ onPress
15
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
16
+ onPress: onPress,
17
+ style: {
18
+ button: styles.button
19
+ },
20
+ variant: _reactNativeUi.ButtonVariant.PRIMARY,
21
+ size: _reactNativeUi.ButtonSize.MEDIUM,
22
+ colorScheme: _reactNativeUi.ButtonColor.WHITE,
23
+ raiseLevel: 5,
24
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CloseIcon.CloseIcon, {
25
+ width: 18,
26
+ height: 18
27
+ })
28
+ });
29
+ exports.CloseButton = CloseButton;
30
+ const styles = _reactNative.StyleSheet.create({
31
+ button: {
32
+ width: 38,
33
+ height: 38,
34
+ borderRadius: 36,
35
+ paddingHorizontal: 0,
36
+ borderColor: _reactNativeUi.COLORS.NEUTRAL_5
37
+ }
38
+ });
39
+ //# sourceMappingURL=CloseButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_CloseIcon","_jsxRuntime","e","__esModule","default","CloseButton","onPress","jsx","Button","style","button","styles","variant","ButtonVariant","PRIMARY","size","ButtonSize","MEDIUM","colorScheme","ButtonColor","WHITE","raiseLevel","children","CloseIcon","width","height","exports","StyleSheet","create","borderRadius","paddingHorizontal","borderColor","COLORS","NEUTRAL_5"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/Chat/CloseButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAA8D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAMvD,MAAMG,WAAW,GAAGA,CAAC;EAAEC;AAA0B,CAAC,kBACvD,IAAAL,WAAA,CAAAM,GAAA,EAACR,cAAA,CAAAS,MAAM;EACLF,OAAO,EAAEA,OAAQ;EACjBG,KAAK,EAAE;IAAEC,MAAM,EAAEC,MAAM,CAACD;EAAO,CAAE;EACjCE,OAAO,EAAEC,4BAAa,CAACC,OAAQ;EAC/BC,IAAI,EAAEC,yBAAU,CAACC,MAAO;EACxBC,WAAW,EAAEC,0BAAW,CAACC,KAAM;EAC/BC,UAAU,EAAE,CAAE;EAAAC,QAAA,eAEd,IAAArB,WAAA,CAAAM,GAAA,EAACP,UAAA,CAAAuB,SAAS;IAACC,KAAK,EAAE,EAAG;IAACC,MAAM,EAAE;EAAG,CAAE;AAAC,CAC9B,CACT;AAAAC,OAAA,CAAArB,WAAA,GAAAA,WAAA;AAED,MAAMM,MAAM,GAAGgB,uBAAU,CAACC,MAAM,CAAC;EAC/BlB,MAAM,EAAE;IACNc,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVI,YAAY,EAAE,EAAE;IAChBC,iBAAiB,EAAE,CAAC;IACpBC,WAAW,EAAEC,qBAAM,CAACC;EACtB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.GradientFade = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const WebGradient = ({
12
+ colors,
13
+ locations,
14
+ style
15
+ }) => {
16
+ const stops = colors.map((color, i) => {
17
+ const position = locations ? `${locations[i] * 100}%` : undefined;
18
+ return position ? `${color} ${position}` : color;
19
+ }).join(', ');
20
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
21
+ style: [_reactNative.StyleSheet.absoluteFill, style, {
22
+ backgroundImage: `linear-gradient(to bottom, ${stops})`
23
+ }]
24
+ });
25
+ };
26
+ const NativeGradient = ({
27
+ colors,
28
+ locations,
29
+ style
30
+ }) => {
31
+ const {
32
+ LinearGradient
33
+ } = require('expo-linear-gradient');
34
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinearGradient, {
35
+ colors: colors,
36
+ locations: locations,
37
+ style: [_reactNative.StyleSheet.absoluteFill, style]
38
+ });
39
+ };
40
+ const GradientFade = exports.GradientFade = _reactNative.Platform.select({
41
+ web: WebGradient,
42
+ default: NativeGradient
43
+ });
44
+ //# sourceMappingURL=GradientFade.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","WebGradient","colors","locations","style","stops","map","color","i","position","undefined","join","jsx","View","StyleSheet","absoluteFill","backgroundImage","NativeGradient","LinearGradient","GradientFade","exports","Platform","select","web"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/Chat/GradientFade.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAoE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQpE,MAAMG,WAAW,GAAGA,CAAC;EAAEC,MAAM;EAAEC,SAAS;EAAEC;AAAyB,CAAC,KA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