@magmamath/students-features 0.4.0-rc.0 → 0.4.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 (623) hide show
  1. package/dist/commonjs/features/celebrations/components/Celebrations.js +51 -0
  2. package/dist/commonjs/features/celebrations/components/Celebrations.js.map +1 -0
  3. package/dist/commonjs/features/celebrations/components/Particle.js +84 -0
  4. package/dist/commonjs/features/celebrations/components/Particle.js.map +1 -0
  5. package/dist/commonjs/features/celebrations/components/ParticleBatch.js +45 -0
  6. package/dist/commonjs/features/celebrations/components/ParticleBatch.js.map +1 -0
  7. package/dist/commonjs/features/celebrations/components/Spark.js +23 -0
  8. package/dist/commonjs/features/celebrations/components/Spark.js.map +1 -0
  9. package/dist/commonjs/features/celebrations/config.js +199 -0
  10. package/dist/commonjs/features/celebrations/config.js.map +1 -0
  11. package/dist/commonjs/features/celebrations/helpers.js +94 -0
  12. package/dist/commonjs/features/celebrations/helpers.js.map +1 -0
  13. package/dist/commonjs/features/celebrations/index.js +28 -0
  14. package/dist/commonjs/features/celebrations/index.js.map +1 -0
  15. package/dist/commonjs/features/celebrations/types.js +15 -0
  16. package/dist/commonjs/features/celebrations/types.js.map +1 -0
  17. package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  18. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -6
  19. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  20. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +1 -12
  21. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  22. package/dist/commonjs/features/chatbot/components/Chatbot.js +1 -5
  23. package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
  24. package/dist/commonjs/features/chatbot/index.js +7 -0
  25. package/dist/commonjs/features/chatbot/index.js.map +1 -1
  26. package/dist/commonjs/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +17 -28
  27. package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
  28. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +117 -136
  29. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  30. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +1 -0
  31. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  32. package/dist/commonjs/features/chatbot/model/ThreadItem.js +8 -21
  33. package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
  34. package/dist/commonjs/features/chatbot/model/{ChatbotApi.js → api.js} +1 -16
  35. package/dist/commonjs/features/chatbot/model/api.js.map +1 -0
  36. package/dist/commonjs/features/chatbot/model/messagesHelper.js +5 -1
  37. package/dist/commonjs/features/chatbot/model/messagesHelper.js.map +1 -1
  38. package/dist/commonjs/features/chatbot/model/t2s.js +6 -0
  39. package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
  40. package/dist/commonjs/features/chatbot/model/translation.helpers.js.map +1 -1
  41. package/dist/commonjs/features/chatbot/model/translation.js +45 -54
  42. package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
  43. package/dist/commonjs/features/chatbot/types/api.types.js +0 -4
  44. package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
  45. package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +58 -0
  46. package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -0
  47. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +247 -0
  48. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -0
  49. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +131 -0
  50. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -0
  51. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +56 -0
  52. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +1 -0
  53. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +68 -0
  54. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +1 -0
  55. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js +53 -0
  56. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +1 -0
  57. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +47 -0
  58. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +1 -0
  59. package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +69 -0
  60. package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -0
  61. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +55 -0
  62. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -0
  63. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +102 -0
  64. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -0
  65. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +83 -0
  66. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +1 -0
  67. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
  68. package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +96 -0
  69. package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +1 -0
  70. package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js +44 -0
  71. package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js.map +1 -0
  72. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +233 -0
  73. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -0
  74. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +63 -0
  75. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -0
  76. package/dist/commonjs/features/endOfAssignment/components/Modal/model.js +34 -0
  77. package/dist/commonjs/features/endOfAssignment/components/Modal/model.js.map +1 -0
  78. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +91 -0
  79. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -0
  80. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +107 -0
  81. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +1 -0
  82. package/dist/commonjs/features/endOfAssignment/constants.js +55 -0
  83. package/dist/commonjs/features/endOfAssignment/constants.js.map +1 -0
  84. package/dist/commonjs/features/endOfAssignment/helpers.js +64 -0
  85. package/dist/commonjs/features/endOfAssignment/helpers.js.map +1 -0
  86. package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js +51 -0
  87. package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js.map +1 -0
  88. package/dist/commonjs/features/endOfAssignment/index.js +40 -0
  89. package/dist/commonjs/features/endOfAssignment/index.js.map +1 -0
  90. package/dist/commonjs/features/endOfAssignment/model/model.js +53 -0
  91. package/dist/commonjs/features/endOfAssignment/model/model.js.map +1 -0
  92. package/dist/commonjs/features/endOfAssignment/types.js +33 -0
  93. package/dist/commonjs/features/endOfAssignment/types.js.map +1 -0
  94. package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js +43 -0
  95. package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js.map +1 -0
  96. package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js +30 -0
  97. package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js.map +1 -0
  98. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +65 -0
  99. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -0
  100. package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js +29 -0
  101. package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js.map +1 -0
  102. package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js +32 -0
  103. package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js.map +1 -0
  104. package/dist/commonjs/index.js +24 -0
  105. package/dist/commonjs/index.js.map +1 -1
  106. package/dist/commonjs/lib/effector/createEntityFieldStore.js +0 -4
  107. package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
  108. package/dist/commonjs/shared/icons/Halloween.js +54 -0
  109. package/dist/commonjs/shared/icons/Halloween.js.map +1 -0
  110. package/dist/commonjs/shared/icons/Pi.js +30 -0
  111. package/dist/commonjs/shared/icons/Pi.js.map +1 -0
  112. package/dist/commonjs/shared/icons/Star.js +30 -0
  113. package/dist/commonjs/shared/icons/Star.js.map +1 -0
  114. package/dist/commonjs/shared/icons/{StopIcon.js → Valentine.js} +9 -12
  115. package/dist/commonjs/shared/icons/Valentine.js.map +1 -0
  116. package/dist/commonjs/shared/icons/Winter.js +32 -0
  117. package/dist/commonjs/shared/icons/Winter.js.map +1 -0
  118. package/dist/commonjs/shared/icons/icon.types.js +0 -4
  119. package/dist/module/features/celebrations/components/Celebrations.js +45 -0
  120. package/dist/module/features/celebrations/components/Celebrations.js.map +1 -0
  121. package/dist/module/features/celebrations/components/Particle.js +76 -0
  122. package/dist/module/features/celebrations/components/Particle.js.map +1 -0
  123. package/dist/module/features/celebrations/components/ParticleBatch.js +38 -0
  124. package/dist/module/features/celebrations/components/ParticleBatch.js.map +1 -0
  125. package/dist/module/features/celebrations/components/Spark.js +17 -0
  126. package/dist/module/features/celebrations/components/Spark.js.map +1 -0
  127. package/dist/module/features/celebrations/config.js +194 -0
  128. package/dist/module/features/celebrations/config.js.map +1 -0
  129. package/dist/module/features/celebrations/helpers.js +87 -0
  130. package/dist/module/features/celebrations/helpers.js.map +1 -0
  131. package/dist/module/features/celebrations/index.js +5 -0
  132. package/dist/module/features/celebrations/index.js.map +1 -0
  133. package/dist/module/features/celebrations/types.js +11 -0
  134. package/dist/module/features/celebrations/types.js.map +1 -0
  135. package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  136. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -6
  137. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  138. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +1 -12
  139. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  140. package/dist/module/features/chatbot/components/Chatbot.js +2 -6
  141. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  142. package/dist/module/features/chatbot/index.js +1 -0
  143. package/dist/module/features/chatbot/index.js.map +1 -1
  144. package/dist/module/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +15 -26
  145. package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
  146. package/dist/module/features/chatbot/model/ChatBotModel.js +119 -138
  147. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  148. package/dist/module/features/chatbot/model/DefaultMessageCreator.js +1 -0
  149. package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  150. package/dist/module/features/chatbot/model/ThreadItem.js +8 -21
  151. package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
  152. package/dist/module/features/chatbot/model/{ChatbotApi.js → api.js} +1 -16
  153. package/dist/module/features/chatbot/model/api.js.map +1 -0
  154. package/dist/module/features/chatbot/model/messagesHelper.js +5 -1
  155. package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
  156. package/dist/module/features/chatbot/model/t2s.js +7 -1
  157. package/dist/module/features/chatbot/model/t2s.js.map +1 -1
  158. package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
  159. package/dist/module/features/chatbot/model/translation.js +45 -54
  160. package/dist/module/features/chatbot/model/translation.js.map +1 -1
  161. package/dist/module/features/chatbot/types/api.types.js +0 -2
  162. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  163. package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js +52 -0
  164. package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -0
  165. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +241 -0
  166. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -0
  167. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +124 -0
  168. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -0
  169. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +50 -0
  170. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +1 -0
  171. package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +62 -0
  172. package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +1 -0
  173. package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js +47 -0
  174. package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +1 -0
  175. package/dist/module/features/endOfAssignment/components/EOAModal.js +41 -0
  176. package/dist/module/features/endOfAssignment/components/EOAModal.js.map +1 -0
  177. package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js +63 -0
  178. package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -0
  179. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +49 -0
  180. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -0
  181. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +96 -0
  182. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -0
  183. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +77 -0
  184. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +1 -0
  185. package/dist/module/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
  186. package/dist/module/features/endOfAssignment/components/Modal/Modal.js +89 -0
  187. package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +1 -0
  188. package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js +38 -0
  189. package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js.map +1 -0
  190. package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +226 -0
  191. package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -0
  192. package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +56 -0
  193. package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -0
  194. package/dist/module/features/endOfAssignment/components/Modal/model.js +29 -0
  195. package/dist/module/features/endOfAssignment/components/Modal/model.js.map +1 -0
  196. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +85 -0
  197. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -0
  198. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +100 -0
  199. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +1 -0
  200. package/dist/module/features/endOfAssignment/constants.js +51 -0
  201. package/dist/module/features/endOfAssignment/constants.js.map +1 -0
  202. package/dist/module/features/endOfAssignment/helpers.js +58 -0
  203. package/dist/module/features/endOfAssignment/helpers.js.map +1 -0
  204. package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js +46 -0
  205. package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js.map +1 -0
  206. package/dist/module/features/endOfAssignment/index.js +6 -0
  207. package/dist/module/features/endOfAssignment/index.js.map +1 -0
  208. package/dist/module/features/endOfAssignment/model/model.js +48 -0
  209. package/dist/module/features/endOfAssignment/model/model.js.map +1 -0
  210. package/dist/module/features/endOfAssignment/types.js +29 -0
  211. package/dist/module/features/endOfAssignment/types.js.map +1 -0
  212. package/dist/module/features/endOfAssignment/ui/EOABadge.js +37 -0
  213. package/dist/module/features/endOfAssignment/ui/EOABadge.js.map +1 -0
  214. package/dist/module/features/endOfAssignment/ui/PracticeButton.js +24 -0
  215. package/dist/module/features/endOfAssignment/ui/PracticeButton.js.map +1 -0
  216. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +58 -0
  217. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -0
  218. package/dist/module/features/endOfAssignment/ui/SparkIcon.js +21 -0
  219. package/dist/module/features/endOfAssignment/ui/SparkIcon.js.map +1 -0
  220. package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js +24 -0
  221. package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js.map +1 -0
  222. package/dist/module/index.js +2 -0
  223. package/dist/module/index.js.map +1 -1
  224. package/dist/module/lib/effector/createEntityFieldStore.js +0 -4
  225. package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
  226. package/dist/module/shared/icons/Halloween.js +47 -0
  227. package/dist/module/shared/icons/Halloween.js.map +1 -0
  228. package/dist/module/shared/icons/Pi.js +23 -0
  229. package/dist/module/shared/icons/Pi.js.map +1 -0
  230. package/dist/module/shared/icons/Star.js +23 -0
  231. package/dist/module/shared/icons/Star.js.map +1 -0
  232. package/dist/module/shared/icons/Valentine.js +23 -0
  233. package/dist/module/shared/icons/Valentine.js.map +1 -0
  234. package/dist/module/shared/icons/Winter.js +25 -0
  235. package/dist/module/shared/icons/Winter.js.map +1 -0
  236. package/dist/module/shared/icons/icon.types.js +0 -2
  237. package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts +10 -0
  238. package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts.map +1 -0
  239. package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts +19 -0
  240. package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts.map +1 -0
  241. package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts +26 -0
  242. package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts.map +1 -0
  243. package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts +4 -0
  244. package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +1 -0
  245. package/dist/typescript/commonjs/features/celebrations/config.d.ts +167 -0
  246. package/dist/typescript/commonjs/features/celebrations/config.d.ts.map +1 -0
  247. package/dist/typescript/commonjs/features/celebrations/helpers.d.ts +6 -0
  248. package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -0
  249. package/dist/typescript/commonjs/features/celebrations/index.d.ts +3 -0
  250. package/dist/typescript/commonjs/features/celebrations/index.d.ts.map +1 -0
  251. package/dist/typescript/commonjs/features/celebrations/types.d.ts +11 -0
  252. package/dist/typescript/commonjs/features/celebrations/types.d.ts.map +1 -0
  253. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +0 -1
  254. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  255. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  256. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  257. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  258. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  259. package/dist/typescript/commonjs/features/chatbot/index.d.ts +3 -4
  260. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  261. package/dist/typescript/commonjs/features/chatbot/model/{ChatBotThreadManager.d.ts → ChatBotMessageHandler.d.ts} +8 -11
  262. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
  263. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +14 -19
  264. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  265. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +2 -3
  266. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  267. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +6 -12
  268. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  269. package/dist/typescript/commonjs/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
  270. package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +1 -0
  271. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +4 -3
  272. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  273. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +4 -2
  274. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
  275. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +8 -7
  276. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
  277. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +1 -2
  278. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  279. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +11 -2
  280. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  281. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +19 -26
  282. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  283. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +1 -2
  284. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
  285. package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +4 -0
  286. package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -0
  287. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +15 -0
  288. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -0
  289. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +4 -0
  290. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -0
  291. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +8 -0
  292. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +1 -0
  293. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +8 -0
  294. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +1 -0
  295. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +12 -0
  296. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +1 -0
  297. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +11 -0
  298. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +1 -0
  299. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +4 -0
  300. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -0
  301. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +4 -0
  302. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -0
  303. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +4 -0
  304. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -0
  305. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +8 -0
  306. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +1 -0
  307. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts +20 -0
  308. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -0
  309. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts +3 -0
  310. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +1 -0
  311. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +4 -0
  312. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -0
  313. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +4 -0
  314. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -0
  315. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts +14 -0
  316. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts.map +1 -0
  317. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +4 -0
  318. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -0
  319. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +8 -0
  320. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +1 -0
  321. package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts +41 -0
  322. package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts.map +1 -0
  323. package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts +9 -0
  324. package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts.map +1 -0
  325. package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts +27 -0
  326. package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +1 -0
  327. package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts +4 -0
  328. package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts.map +1 -0
  329. package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts +14 -0
  330. package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +1 -0
  331. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +60 -0
  332. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +1 -0
  333. package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts +11 -0
  334. package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts.map +1 -0
  335. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts +10 -0
  336. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts.map +1 -0
  337. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +14 -0
  338. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -0
  339. package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts +4 -0
  340. package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -0
  341. package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts +4 -0
  342. package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +1 -0
  343. package/dist/typescript/commonjs/index.d.ts +2 -0
  344. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  345. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +0 -2
  346. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  347. package/dist/typescript/commonjs/shared/icons/Halloween.d.ts +5 -0
  348. package/dist/typescript/commonjs/shared/icons/Halloween.d.ts.map +1 -0
  349. package/dist/typescript/commonjs/shared/icons/Pi.d.ts +5 -0
  350. package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +1 -0
  351. package/dist/typescript/commonjs/shared/icons/Star.d.ts +5 -0
  352. package/dist/typescript/commonjs/shared/icons/Star.d.ts.map +1 -0
  353. package/dist/typescript/commonjs/shared/icons/Valentine.d.ts +5 -0
  354. package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +1 -0
  355. package/dist/typescript/commonjs/shared/icons/Winter.d.ts +5 -0
  356. package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +1 -0
  357. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +0 -2
  358. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
  359. package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts +10 -0
  360. package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts.map +1 -0
  361. package/dist/typescript/module/features/celebrations/components/Particle.d.ts +19 -0
  362. package/dist/typescript/module/features/celebrations/components/Particle.d.ts.map +1 -0
  363. package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts +26 -0
  364. package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts.map +1 -0
  365. package/dist/typescript/module/features/celebrations/components/Spark.d.ts +4 -0
  366. package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +1 -0
  367. package/dist/typescript/module/features/celebrations/config.d.ts +167 -0
  368. package/dist/typescript/module/features/celebrations/config.d.ts.map +1 -0
  369. package/dist/typescript/module/features/celebrations/helpers.d.ts +6 -0
  370. package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -0
  371. package/dist/typescript/module/features/celebrations/index.d.ts +3 -0
  372. package/dist/typescript/module/features/celebrations/index.d.ts.map +1 -0
  373. package/dist/typescript/module/features/celebrations/types.d.ts +11 -0
  374. package/dist/typescript/module/features/celebrations/types.d.ts.map +1 -0
  375. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +0 -1
  376. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  377. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  378. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  379. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  380. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  381. package/dist/typescript/module/features/chatbot/index.d.ts +3 -4
  382. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  383. package/dist/typescript/module/features/chatbot/model/{ChatBotThreadManager.d.ts → ChatBotMessageHandler.d.ts} +8 -11
  384. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
  385. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +14 -19
  386. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  387. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +2 -3
  388. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  389. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +6 -12
  390. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  391. package/dist/typescript/module/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
  392. package/dist/typescript/module/features/chatbot/model/api.d.ts.map +1 -0
  393. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +4 -3
  394. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  395. package/dist/typescript/module/features/chatbot/model/t2s.d.ts +4 -2
  396. package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
  397. package/dist/typescript/module/features/chatbot/model/translation.d.ts +8 -7
  398. package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
  399. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +1 -2
  400. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  401. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +11 -2
  402. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  403. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +19 -26
  404. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  405. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +1 -2
  406. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
  407. package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +4 -0
  408. package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -0
  409. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +15 -0
  410. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -0
  411. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +4 -0
  412. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -0
  413. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +8 -0
  414. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +1 -0
  415. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +8 -0
  416. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +1 -0
  417. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +12 -0
  418. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +1 -0
  419. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +11 -0
  420. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +1 -0
  421. package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +4 -0
  422. package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -0
  423. package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +4 -0
  424. package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -0
  425. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +4 -0
  426. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -0
  427. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +8 -0
  428. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +1 -0
  429. package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts +20 -0
  430. package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -0
  431. package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts +3 -0
  432. package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +1 -0
  433. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +4 -0
  434. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -0
  435. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +4 -0
  436. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -0
  437. package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts +14 -0
  438. package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts.map +1 -0
  439. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +4 -0
  440. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -0
  441. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +8 -0
  442. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +1 -0
  443. package/dist/typescript/module/features/endOfAssignment/constants.d.ts +41 -0
  444. package/dist/typescript/module/features/endOfAssignment/constants.d.ts.map +1 -0
  445. package/dist/typescript/module/features/endOfAssignment/helpers.d.ts +9 -0
  446. package/dist/typescript/module/features/endOfAssignment/helpers.d.ts.map +1 -0
  447. package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts +27 -0
  448. package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +1 -0
  449. package/dist/typescript/module/features/endOfAssignment/index.d.ts +4 -0
  450. package/dist/typescript/module/features/endOfAssignment/index.d.ts.map +1 -0
  451. package/dist/typescript/module/features/endOfAssignment/model/model.d.ts +14 -0
  452. package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +1 -0
  453. package/dist/typescript/module/features/endOfAssignment/types.d.ts +60 -0
  454. package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +1 -0
  455. package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts +11 -0
  456. package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts.map +1 -0
  457. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts +10 -0
  458. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts.map +1 -0
  459. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +14 -0
  460. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -0
  461. package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts +4 -0
  462. package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -0
  463. package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts +4 -0
  464. package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +1 -0
  465. package/dist/typescript/module/index.d.ts +2 -0
  466. package/dist/typescript/module/index.d.ts.map +1 -1
  467. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +0 -2
  468. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  469. package/dist/typescript/module/shared/icons/Halloween.d.ts +5 -0
  470. package/dist/typescript/module/shared/icons/Halloween.d.ts.map +1 -0
  471. package/dist/typescript/module/shared/icons/Pi.d.ts +5 -0
  472. package/dist/typescript/module/shared/icons/Pi.d.ts.map +1 -0
  473. package/dist/typescript/module/shared/icons/Star.d.ts +5 -0
  474. package/dist/typescript/module/shared/icons/Star.d.ts.map +1 -0
  475. package/dist/typescript/module/shared/icons/Valentine.d.ts +5 -0
  476. package/dist/typescript/module/shared/icons/Valentine.d.ts.map +1 -0
  477. package/dist/typescript/module/shared/icons/Winter.d.ts +5 -0
  478. package/dist/typescript/module/shared/icons/Winter.d.ts.map +1 -0
  479. package/dist/typescript/module/shared/icons/icon.types.d.ts +0 -2
  480. package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
  481. package/package.json +4 -2
  482. package/src/features/celebrations/components/Celebrations.tsx +62 -0
  483. package/src/features/celebrations/components/Particle.tsx +99 -0
  484. package/src/features/celebrations/components/ParticleBatch.tsx +56 -0
  485. package/src/features/celebrations/components/Spark.tsx +14 -0
  486. package/src/features/celebrations/config.ts +199 -0
  487. package/src/features/celebrations/helpers.ts +96 -0
  488. package/src/features/celebrations/index.ts +2 -0
  489. package/src/features/celebrations/types.ts +11 -0
  490. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +0 -1
  491. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +0 -3
  492. package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +0 -14
  493. package/src/features/chatbot/components/Chatbot.tsx +2 -3
  494. package/src/features/chatbot/index.ts +3 -3
  495. package/src/features/chatbot/model/{ChatBotThreadManager.ts → ChatBotMessageHandler.ts} +16 -28
  496. package/src/features/chatbot/model/ChatBotModel.ts +124 -123
  497. package/src/features/chatbot/model/DefaultMessageCreator.ts +3 -3
  498. package/src/features/chatbot/model/ThreadItem.ts +9 -20
  499. package/src/features/chatbot/model/{ChatbotApi.ts → api.ts} +2 -19
  500. package/src/features/chatbot/model/messagesHelper.ts +6 -2
  501. package/src/features/chatbot/model/t2s.ts +10 -3
  502. package/src/features/chatbot/model/translation.helpers.ts +1 -2
  503. package/src/features/chatbot/model/translation.ts +46 -52
  504. package/src/features/chatbot/types/api.types.ts +12 -2
  505. package/src/features/chatbot/types/model.types.ts +26 -38
  506. package/src/features/chatbot/types/translation.types.ts +1 -2
  507. package/src/features/endOfAssignment/components/CheatDetected/CheatDetected.tsx +48 -0
  508. package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +293 -0
  509. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +128 -0
  510. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.tsx +39 -0
  511. package/src/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.tsx +40 -0
  512. package/src/features/endOfAssignment/components/CorrectAnswer/Spark.tsx +45 -0
  513. package/src/features/endOfAssignment/components/EOAModal.tsx +64 -0
  514. package/src/features/endOfAssignment/components/ExamLeave/ExamLeave.tsx +56 -0
  515. package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +46 -0
  516. package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +102 -0
  517. package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.tsx +69 -0
  518. package/src/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
  519. package/src/features/endOfAssignment/components/Modal/Modal.tsx +105 -0
  520. package/src/features/endOfAssignment/components/Modal/ModalBackground.tsx +33 -0
  521. package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +196 -0
  522. package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +62 -0
  523. package/src/features/endOfAssignment/components/Modal/model.ts +34 -0
  524. package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +85 -0
  525. package/src/features/endOfAssignment/components/NoAnswer/NoAnswerContent.tsx +107 -0
  526. package/src/features/endOfAssignment/constants.ts +53 -0
  527. package/src/features/endOfAssignment/helpers.ts +28 -0
  528. package/src/features/endOfAssignment/hooks/useSparkAnimation.tsx +78 -0
  529. package/src/features/endOfAssignment/index.ts +3 -0
  530. package/src/features/endOfAssignment/model/model.ts +57 -0
  531. package/src/features/endOfAssignment/types.ts +65 -0
  532. package/src/features/endOfAssignment/ui/EOABadge.tsx +47 -0
  533. package/src/features/endOfAssignment/ui/PracticeButton.tsx +27 -0
  534. package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +75 -0
  535. package/src/features/endOfAssignment/ui/SparkIcon.tsx +15 -0
  536. package/src/features/endOfAssignment/ui/ThumbUpIcon.tsx +17 -0
  537. package/src/index.ts +2 -0
  538. package/src/lib/effector/createEntityFieldStore.ts +1 -9
  539. package/src/shared/icons/Halloween.tsx +33 -0
  540. package/src/shared/icons/Pi.tsx +16 -0
  541. package/src/shared/icons/Star.tsx +16 -0
  542. package/src/shared/icons/Valentine.tsx +16 -0
  543. package/src/shared/icons/Winter.tsx +19 -0
  544. package/src/shared/icons/icon.types.ts +6 -9
  545. package/dist/commonjs/features/chatbot/context/ChatBotContext.js +0 -17
  546. package/dist/commonjs/features/chatbot/context/ChatBotContext.js.map +0 -1
  547. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -58
  548. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
  549. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -99
  550. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
  551. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
  552. package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +0 -1
  553. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -110
  554. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +0 -1
  555. package/dist/commonjs/features/chatbot/types/units.types.js +0 -2
  556. package/dist/commonjs/features/chatbot/types/units.types.js.map +0 -1
  557. package/dist/commonjs/lib/helpers/randomElements.js +0 -24
  558. package/dist/commonjs/lib/helpers/randomElements.js.map +0 -1
  559. package/dist/commonjs/shared/icons/HighlighterIcon.js +0 -36
  560. package/dist/commonjs/shared/icons/HighlighterIcon.js.map +0 -1
  561. package/dist/commonjs/shared/icons/StopIcon.js.map +0 -1
  562. package/dist/module/features/chatbot/context/ChatBotContext.js +0 -12
  563. package/dist/module/features/chatbot/context/ChatBotContext.js.map +0 -1
  564. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -52
  565. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
  566. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -94
  567. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
  568. package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
  569. package/dist/module/features/chatbot/model/ChatbotApi.js.map +0 -1
  570. package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -104
  571. package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +0 -1
  572. package/dist/module/features/chatbot/types/units.types.js +0 -2
  573. package/dist/module/features/chatbot/types/units.types.js.map +0 -1
  574. package/dist/module/lib/helpers/randomElements.js +0 -20
  575. package/dist/module/lib/helpers/randomElements.js.map +0 -1
  576. package/dist/module/shared/icons/HighlighterIcon.js +0 -29
  577. package/dist/module/shared/icons/HighlighterIcon.js.map +0 -1
  578. package/dist/module/shared/icons/StopIcon.js +0 -26
  579. package/dist/module/shared/icons/StopIcon.js.map +0 -1
  580. package/dist/typescript/commonjs/features/chatbot/context/ChatBotContext.d.ts +0 -8
  581. package/dist/typescript/commonjs/features/chatbot/context/ChatBotContext.d.ts.map +0 -1
  582. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -3
  583. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
  584. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -28
  585. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
  586. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
  587. package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
  588. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -26
  589. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
  590. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -31
  591. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +0 -1
  592. package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts +0 -2
  593. package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts.map +0 -1
  594. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +0 -4
  595. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +0 -1
  596. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +0 -4
  597. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +0 -1
  598. package/dist/typescript/module/features/chatbot/context/ChatBotContext.d.ts +0 -8
  599. package/dist/typescript/module/features/chatbot/context/ChatBotContext.d.ts.map +0 -1
  600. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -3
  601. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
  602. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -28
  603. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
  604. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
  605. package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
  606. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -26
  607. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
  608. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -31
  609. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +0 -1
  610. package/dist/typescript/module/lib/helpers/randomElements.d.ts +0 -2
  611. package/dist/typescript/module/lib/helpers/randomElements.d.ts.map +0 -1
  612. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +0 -4
  613. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +0 -1
  614. package/dist/typescript/module/shared/icons/StopIcon.d.ts +0 -4
  615. package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +0 -1
  616. package/src/features/chatbot/context/ChatBotContext.ts +0 -18
  617. package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +0 -53
  618. package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +0 -116
  619. package/src/features/chatbot/model/ChatsCacheModel.ts +0 -94
  620. package/src/features/chatbot/types/units.types.ts +0 -34
  621. package/src/lib/helpers/randomElements.ts +0 -22
  622. package/src/shared/icons/HighlighterIcon.tsx +0 -21
  623. package/src/shared/icons/StopIcon.tsx +0 -17
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Celebrations = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _ParticleBatch = require("./ParticleBatch.js");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ 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); }
12
+ 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; }
13
+ const Celebrations = exports.Celebrations = /*#__PURE__*/(0, _react.memo)(({
14
+ style,
15
+ modelRef
16
+ }) => {
17
+ const activeBatchesIds = (0, _react.useRef)(new Set());
18
+ const [particlesBatches, setParticlesBatches] = (0, _react.useState)([]);
19
+ const [containerWidth, setContainerWidth] = (0, _react.useState)(0);
20
+ const addParticlesBatch = variant => {
21
+ const batchId = Math.random();
22
+ activeBatchesIds.current.add(batchId);
23
+ setParticlesBatches(prev => [...prev, /*#__PURE__*/(0, _jsxRuntime.jsx)(_ParticleBatch.ParticleBatch, {
24
+ onAnimationEnd: () => {
25
+ activeBatchesIds.current.delete(batchId);
26
+ setParticlesBatches(prev => prev.filter(batch => batch.key !== batchId.toString()));
27
+ },
28
+ containerWidth: containerWidth,
29
+ variant: variant
30
+ }, batchId)]);
31
+ };
32
+ (0, _react.useImperativeHandle)(modelRef, () => ({
33
+ play: addParticlesBatch
34
+ }), [containerWidth]);
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
36
+ style: [styles.container, style],
37
+ onLayout: event => {
38
+ setContainerWidth(event.nativeEvent.layout.width);
39
+ },
40
+ pointerEvents: "box-none",
41
+ children: particlesBatches
42
+ });
43
+ });
44
+ const styles = _reactNative.StyleSheet.create({
45
+ container: {
46
+ zIndex: 0,
47
+ position: 'absolute',
48
+ width: '100%'
49
+ }
50
+ });
51
+ //# sourceMappingURL=Celebrations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_ParticleBatch","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Celebrations","exports","memo","style","modelRef","activeBatchesIds","useRef","Set","particlesBatches","setParticlesBatches","useState","containerWidth","setContainerWidth","addParticlesBatch","variant","batchId","Math","random","current","add","prev","jsx","ParticleBatch","onAnimationEnd","delete","filter","batch","key","toString","useImperativeHandle","play","View","styles","container","onLayout","event","nativeEvent","layout","width","pointerEvents","children","StyleSheet","create","zIndex","position"],"sourceRoot":"../../../../../src","sources":["features/celebrations/components/Celebrations.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAA+C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAA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;QACxCN,mBAAmB,CAAEW,IAAI,IAAKA,IAAI,CAACK,MAAM,CAAEC,KAAK,IAAKA,KAAK,CAACC,GAAG,KAAKZ,OAAO,CAACa,QAAQ,CAAC,CAAC,CAAC,CAAC;MACzF,CAAE;MACFjB,cAAc,EAAEA,cAAe;MAC/BG,OAAO,EAAEA;IAAQ,GANZC,OAON,CAAC,CACH,CAAC;EACJ,CAAC;EAED,IAAAc,0BAAmB,EACjBzB,QAAQ,EACR,OAAO;IACL0B,IAAI,EAAEjB;EACR,CAAC,CAAC,EACF,CAACF,cAAc,CACjB,CAAC;EAED,oBACE,IAAAhC,WAAA,CAAA0C,GAAA,EAAC/C,YAAA,CAAAyD,IAAI;IACH5B,KAAK,EAAE,CAAC6B,MAAM,CAACC,SAAS,EAAE9B,KAAK,CAAE;IACjC+B,QAAQ,EAAGC,KAAK,IAAK;MACnBvB,iBAAiB,CAACuB,KAAK,CAACC,WAAW,CAACC,MAAM,CAACC,KAAK,CAAC;IACnD,CAAE;IACFC,aAAa,EAAC,UAAU;IAAAC,QAAA,EAEvBhC;EAAgB,CACb,CAAC;AAEX,CAAC,CAAC;AAEF,MAAMwB,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,UAAU;IACpBN,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Particle = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
9
+ var _reactNative = require("react-native");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ 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); }
12
+ 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; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ const Particle = ({
15
+ onAnimationEnd,
16
+ children,
17
+ initialPreset: {
18
+ xOffset,
19
+ velocity,
20
+ rotationSpeed,
21
+ rotation,
22
+ angularAcceleration,
23
+ friction,
24
+ life
25
+ }
26
+ }) => {
27
+ const particleState = (0, _reactNativeReanimated.useSharedValue)({
28
+ x: 0,
29
+ y: 0,
30
+ opacity: 1,
31
+ rotation,
32
+ velocity: {
33
+ x: velocity.x,
34
+ y: velocity.y
35
+ },
36
+ life
37
+ });
38
+ const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
39
+ return {
40
+ left: particleState.value.x + xOffset,
41
+ top: particleState.value.y,
42
+ opacity: particleState.value.opacity,
43
+ transform: [{
44
+ rotate: `${particleState.value.rotation * Math.PI / 180}rad`
45
+ }]
46
+ };
47
+ }, [particleState]);
48
+ const animationFinished = () => {
49
+ onAnimationEnd?.();
50
+ };
51
+ (0, _reactNativeReanimated.useAnimatedReaction)(() => particleState.value, state => {
52
+ const newVelocity = {
53
+ x: state.velocity.x * friction,
54
+ y: state.velocity.y * friction
55
+ };
56
+ const currentSpeed = Math.sqrt(newVelocity.x ** 2 + newVelocity.y ** 2);
57
+ const angle = Math.atan2(newVelocity.y, newVelocity.x);
58
+ const newAngle = angle + angularAcceleration;
59
+ newVelocity.x = Math.cos(newAngle) * currentSpeed;
60
+ newVelocity.y = Math.sin(newAngle) * currentSpeed;
61
+ particleState.value = {
62
+ x: state.x + newVelocity.x,
63
+ y: state.y + newVelocity.y,
64
+ opacity: state.life / (life / 2),
65
+ rotation: state.rotation + rotationSpeed,
66
+ velocity: newVelocity,
67
+ life: state.life - 1
68
+ };
69
+ if (state.opacity <= 0) {
70
+ (0, _reactNativeReanimated.runOnJS)(animationFinished)();
71
+ }
72
+ }, [particleState]);
73
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
74
+ style: [styles.icon, animatedStyle],
75
+ children: children
76
+ });
77
+ };
78
+ exports.Particle = Particle;
79
+ const styles = _reactNative.StyleSheet.create({
80
+ icon: {
81
+ position: 'absolute'
82
+ }
83
+ });
84
+ //# sourceMappingURL=Particle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeReanimated","_interopRequireWildcard","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Particle","onAnimationEnd","children","initialPreset","xOffset","velocity","rotationSpeed","rotation","angularAcceleration","friction","life","particleState","useSharedValue","x","y","opacity","animatedStyle","useAnimatedStyle","left","value","top","transform","rotate","Math","PI","animationFinished","useAnimatedReaction","state","newVelocity","currentSpeed","sqrt","angle","atan2","newAngle","cos","sin","runOnJS","jsx","View","style","styles","icon","exports","StyleSheet","create","position"],"sourceRoot":"../../../../../src","sources":["features/celebrations/components/Particle.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAMA,IAAAG,YAAA,GAAAH,OAAA;AAAyC,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAA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
+ });
6
+ exports.ParticleBatch = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _config = require("../config.js");
9
+ var _helpers = require("../helpers.js");
10
+ var _Particle = require("./Particle.js");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ 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); }
13
+ 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; }
14
+ const ParticleBatch = ({
15
+ containerWidth,
16
+ onAnimationEnd,
17
+ variant
18
+ }) => {
19
+ const [particles, setParticles] = (0, _react.useState)([]);
20
+ const {
21
+ color
22
+ } = _config.CELEBRATION_VARIANTS[variant];
23
+ const xOffset = containerWidth ? containerWidth / 2 : 0;
24
+ (0, _react.useEffect)(() => {
25
+ setParticles((0, _helpers.generateParticle)(variant));
26
+ }, []);
27
+ return particles.map((p, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Particle.Particle, {
28
+ onAnimationEnd: i === 0 ? onAnimationEnd : undefined,
29
+ initialPreset: {
30
+ velocity: p.velocity,
31
+ angularAcceleration: p.angularAcceleration,
32
+ friction: p.friction,
33
+ rotationSpeed: p.rotationSpeed,
34
+ rotation: p.rotation,
35
+ life: p.life,
36
+ xOffset
37
+ },
38
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(p.Component, {
39
+ size: p.size,
40
+ color: color
41
+ })
42
+ }, p.id));
43
+ };
44
+ exports.ParticleBatch = ParticleBatch;
45
+ //# sourceMappingURL=ParticleBatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_config","_helpers","_Particle","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ParticleBatch","containerWidth","onAnimationEnd","variant","particles","setParticles","useState","color","CELEBRATION_VARIANTS","xOffset","useEffect","generateParticle","map","p","jsx","Particle","undefined","initialPreset","velocity","angularAcceleration","friction","rotationSpeed","rotation","life","children","Component","size","id","exports"],"sourceRoot":"../../../../../src","sources":["features/celebrations/components/ParticleBatch.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAAqC,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,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ACpBC,aAAa,EAAER,CAAC,CAACQ,aAAa;MAC9BC,QAAQ,EAAET,CAAC,CAACS,QAAQ;MACpBC,IAAI,EAAEV,CAAC,CAACU,IAAI;MACZd;IACF,CAAE;IAAAe,QAAA,eAED,IAAA7C,WAAA,CAAAmC,GAAA,EAACD,CAAC,CAACY,SAAS;MAACC,IAAI,EAAEb,CAAC,CAACa,IAAK;MAACnB,KAAK,EAAEA;IAAM,CAAE;EAAC,GAZvCM,CAAC,CAACc,EAaC,CACX,CAAC;AACJ,CAAC;AAAAC,OAAA,CAAA5B,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Spark = 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 Spark = ({
12
+ size = 10,
13
+ color
14
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
15
+ style: {
16
+ width: size,
17
+ height: size,
18
+ backgroundColor: color,
19
+ borderRadius: size / 2
20
+ }
21
+ });
22
+ exports.Spark = Spark;
23
+ //# sourceMappingURL=Spark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","Spark","size","color","jsx","View","style","width","height","backgroundColor","borderRadius","exports"],"sourceRoot":"../../../../../src","sources":["features/celebrations/components/Spark.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAoC,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE7B,MAAMG,KAAK,GAAGA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC;AAAiB,CAAC,kBACnD,IAAAN,WAAA,CAAAO,GAAA,EAACR,YAAA,CAAAS,IAAI;EACHC,KAAK,EAAE;IACLC,KAAK,EAAEL,IAAI;IACXM,MAAM,EAAEN,IAAI;IACZO,eAAe,EAAEN,KAAK;IACtBO,YAAY,EAAER,IAAI,GAAG;EACvB;AAAE,CACH,CACF;AAACS,OAAA,CAAAV,KAAA,GAAAA,KAAA","ignoreList":[]}
@@ -0,0 +1,199 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CELEBRATION_VARIANTS = exports.CELEBRATION_ICON_CONFIG = void 0;
7
+ var _Star = _interopRequireDefault(require("../../shared/icons/Star.js"));
8
+ var _Halloween = _interopRequireDefault(require("../../shared/icons/Halloween.js"));
9
+ var _Pi = _interopRequireDefault(require("../../shared/icons/Pi.js"));
10
+ var _Winter = _interopRequireDefault(require("../../shared/icons/Winter.js"));
11
+ var _Valentine = _interopRequireDefault(require("../../shared/icons/Valentine.js"));
12
+ var _reactNativeUi = require("@magmamath/react-native-ui");
13
+ var _types = require("./types.js");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ const CELEBRATION_ICON_CONFIG = exports.CELEBRATION_ICON_CONFIG = [{
16
+ name: 'default',
17
+ Icon: _Star.default
18
+ }, {
19
+ name: 'pi-day',
20
+ Icon: _Pi.default,
21
+ activePeriod: {
22
+ start: '14-03',
23
+ end: '14-03'
24
+ }
25
+ }, {
26
+ name: 'valentine',
27
+ Icon: _Valentine.default,
28
+ activePeriod: {
29
+ start: '07-02',
30
+ end: '15-02'
31
+ }
32
+ }, {
33
+ name: 'halloween',
34
+ Icon: _Halloween.default,
35
+ activePeriod: {
36
+ start: '20-10',
37
+ end: '01-11'
38
+ }
39
+ }, {
40
+ name: 'winter',
41
+ Icon: _Winter.default,
42
+ activePeriod: {
43
+ start: '01-12',
44
+ end: '07-01'
45
+ }
46
+ }];
47
+ const CELEBRATION_VARIANTS = exports.CELEBRATION_VARIANTS = {
48
+ [_types.CelebrationVariant.FIRST_ATTEMPT]: {
49
+ color: _reactNativeUi.COLORS.PRIMARY_GREEN,
50
+ elementsCount: {
51
+ star: 5,
52
+ spark: 4
53
+ },
54
+ sparkSize: {
55
+ from: 4,
56
+ to: 9
57
+ },
58
+ mainSize: {
59
+ from: 14,
60
+ to: 20
61
+ },
62
+ angle: {
63
+ from: 230,
64
+ to: 280
65
+ },
66
+ velocityMultiplier: 1,
67
+ rotation: {
68
+ from: 0,
69
+ to: 10
70
+ },
71
+ friction: 0.907,
72
+ angularAcceleration: {
73
+ from: -0.05,
74
+ to: 0.05
75
+ },
76
+ life: 65
77
+ },
78
+ [_types.CelebrationVariant.CORRECT]: {
79
+ color: _reactNativeUi.COLORS.PRIMARY_YELLOW,
80
+ elementsCount: {
81
+ star: 4,
82
+ spark: 3
83
+ },
84
+ sparkSize: {
85
+ from: 4,
86
+ to: 9
87
+ },
88
+ mainSize: {
89
+ from: 14,
90
+ to: 20
91
+ },
92
+ angle: {
93
+ from: 235,
94
+ to: 270
95
+ },
96
+ velocityMultiplier: 1,
97
+ rotation: {
98
+ from: 0,
99
+ to: 10
100
+ },
101
+ friction: 0.907,
102
+ angularAcceleration: {
103
+ from: -0.05,
104
+ to: 0.05
105
+ },
106
+ life: 65
107
+ },
108
+ [_types.CelebrationVariant.GBD]: {
109
+ color: _reactNativeUi.COLORS.PRIMARY_ORANGE,
110
+ elementsCount: {
111
+ star: 14,
112
+ spark: 12
113
+ },
114
+ sparkSize: {
115
+ from: 6,
116
+ to: 12
117
+ },
118
+ mainSize: {
119
+ from: 33,
120
+ to: 44
121
+ },
122
+ angle: {
123
+ from: 30,
124
+ to: 330
125
+ },
126
+ velocityMultiplier: 2,
127
+ rotation: {
128
+ from: 5,
129
+ to: 10
130
+ },
131
+ friction: 0.925,
132
+ angularAcceleration: {
133
+ from: -0.03,
134
+ to: 0.03
135
+ },
136
+ life: 120
137
+ },
138
+ [_types.CelebrationVariant.GBD_FINISH_ASSIGNMENT]: {
139
+ color: _reactNativeUi.COLORS.PRIMARY_ORANGE,
140
+ elementsCount: {
141
+ star: 20,
142
+ spark: 16
143
+ },
144
+ sparkSize: {
145
+ from: 4,
146
+ to: 16
147
+ },
148
+ mainSize: {
149
+ from: 16,
150
+ to: 32
151
+ },
152
+ angle: {
153
+ from: 180,
154
+ to: 360
155
+ },
156
+ velocityMultiplier: 1.8,
157
+ rotation: {
158
+ from: 0,
159
+ to: 10
160
+ },
161
+ friction: 0.95,
162
+ angularAcceleration: {
163
+ from: -0.05,
164
+ to: 0.05
165
+ },
166
+ life: 100
167
+ },
168
+ [_types.CelebrationVariant.CORRECT_FINISH_ASSIGNMENT]: {
169
+ color: _reactNativeUi.COLORS.PRIMARY_GREEN,
170
+ elementsCount: {
171
+ star: 20,
172
+ spark: 16
173
+ },
174
+ sparkSize: {
175
+ from: 4,
176
+ to: 16
177
+ },
178
+ mainSize: {
179
+ from: 16,
180
+ to: 32
181
+ },
182
+ angle: {
183
+ from: 180,
184
+ to: 360
185
+ },
186
+ velocityMultiplier: 1.8,
187
+ rotation: {
188
+ from: 0,
189
+ to: 10
190
+ },
191
+ friction: 0.95,
192
+ angularAcceleration: {
193
+ from: -0.05,
194
+ to: 0.05
195
+ },
196
+ life: 100
197
+ }
198
+ };
199
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_Star","_interopRequireDefault","require","_Halloween","_Pi","_Winter","_Valentine","_reactNativeUi","_types","e","__esModule","default","CELEBRATION_ICON_CONFIG","exports","name","Icon","StarIcon","PiIcon","activePeriod","start","end","ValentineIcon","HalloweenIcon","WinterIcon","CELEBRATION_VARIANTS","CelebrationVariant","FIRST_ATTEMPT","color","COLORS","PRIMARY_GREEN","elementsCount","star","spark","sparkSize","from","to","mainSize","angle","velocityMultiplier","rotation","friction","angularAcceleration","life","CORRECT","PRIMARY_YELLOW","GBD","PRIMARY_ORANGE","GBD_FINISH_ASSIGNMENT","CORRECT_FINISH_ASSIGNMENT"],"sourceRoot":"../../../../src","sources":["features/celebrations/config.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,GAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAA6C,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtC,MAAMG,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,CACrC;EACEE,IAAI,EAAE,SAAS;EACfC,IAAI,EAAEC;AACR,CAAC,EACD;EACEF,IAAI,EAAE,QAAQ;EACdC,IAAI,EAAEE,WAAM;EACZC,YAAY,EAAE;IACZC,KAAK,EAAE,OAAO;IACdC,GAAG,EAAE;EACP;AACF,CAAC,EACD;EACEN,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAEM,kBAAa;EACnBH,YAAY,EAAE;IACZC,KAAK,EAAE,OAAO;IACdC,GAAG,EAAE;EACP;AACF,CAAC,EACD;EACEN,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAEO,kBAAa;EACnBJ,YAAY,EAAE;IACZC,KAAK,EAAE,OAAO;IACdC,GAAG,EAAE;EACP;AACF,CAAC,EACD;EACEN,IAAI,EAAE,QAAQ;EACdC,IAAI,EAAEQ,eAAU;EAChBL,YAAY,EAAE;IACZC,KAAK,EAAE,OAAO;IACdC,GAAG,EAAE;EACP;AACF,CAAC,CACF;AAEM,MAAMI,oBAAoB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jB,yBAAkB,CAACuB,yBAAyB,GAAG;IAC9CrB,KAAK,EAAEC,qBAAM,CAACC,aAAa;IAC3BC,aAAa,EAAE;MACbC,IAAI,EAAE,EAAE;MACRC,KAAK,EAAE;IACT,CAAC;IACDC,SAAS,EAAE;MACTC,IAAI,EAAE,CAAC;MACPC,EAAE,EAAE;IACN,CAAC;IACDC,QAAQ,EAAE;MACRF,IAAI,EAAE,EAAE;MACRC,EAAE,EAAE;IACN,CAAC;IACDE,KAAK,EAAE;MACLH,IAAI,EAAE,GAAG;MACTC,EAAE,EAAE;IACN,CAAC;IACDG,kBAAkB,EAAE,GAAG;IACvBC,QAAQ,EAAE;MACRL,IAAI,EAAE,CAAC;MACPC,EAAE,EAAE;IACN,CAAC;IACDK,QAAQ,EAAE,IAAI;IACdC,mBAAmB,EAAE;MACnBP,IAAI,EAAE,CAAC,IAAI;MACXC,EAAE,EAAE;IACN,CAAC;IACDO,IAAI,EAAE;EACR;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.randomRange = exports.getIconForCurrentDate = exports.generateParticle = void 0;
7
+ var _Spark = require("./components/Spark.js");
8
+ var _config = require("./config.js");
9
+ const randomRange = (min, max) => Math.random() * (max - min) + min;
10
+ exports.randomRange = randomRange;
11
+ const isDateInRange = (currentDate, startDateStr, endDateStr) => {
12
+ const [startDay, startMonth] = startDateStr.split('-').map(Number);
13
+ const [endDay, endMonth] = endDateStr.split('-').map(Number);
14
+ const currentYear = currentDate.getFullYear();
15
+ const startDate = new Date(currentYear, startMonth - 1, startDay);
16
+ const endDate = new Date(currentYear, endMonth - 1, endDay + 1);
17
+ return currentDate >= startDate && currentDate <= endDate;
18
+ };
19
+ const getIconForCurrentDate = () => {
20
+ const currentDate = new Date();
21
+ for (const celebration of _config.CELEBRATION_ICON_CONFIG) {
22
+ if (celebration.activePeriod) {
23
+ const {
24
+ start,
25
+ end
26
+ } = celebration.activePeriod;
27
+ if (isDateInRange(currentDate, start, end)) {
28
+ return celebration.Icon;
29
+ }
30
+ }
31
+ }
32
+ return _config.CELEBRATION_ICON_CONFIG[0].Icon;
33
+ };
34
+ exports.getIconForCurrentDate = getIconForCurrentDate;
35
+ const MainIcon = getIconForCurrentDate();
36
+ const generateParticle = variant => {
37
+ const {
38
+ elementsCount,
39
+ angle,
40
+ rotation,
41
+ sparkSize,
42
+ mainSize,
43
+ velocityMultiplier,
44
+ friction,
45
+ life,
46
+ angularAcceleration
47
+ } = _config.CELEBRATION_VARIANTS[variant];
48
+ const particles = [];
49
+ for (let i = 0; i < elementsCount.spark; i++) {
50
+ const randomAngle = randomRange(angle.from * Math.PI / 180, angle.to * Math.PI / 180);
51
+ const randomSpeed = randomRange(4, 18);
52
+ const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
53
+ particles.push({
54
+ id: Math.random(),
55
+ size: randomRange(sparkSize.from, sparkSize.to),
56
+ type: 'spark',
57
+ angle: randomAngle,
58
+ velocity: {
59
+ x: Math.cos(randomAngle) * randomSpeed * velocityMultiplier,
60
+ y: Math.sin(randomAngle) * randomSpeed
61
+ },
62
+ rotation: 0,
63
+ rotationSpeed: 0,
64
+ angularAcceleration: randomAngularAcceleration,
65
+ friction,
66
+ Component: _Spark.Spark,
67
+ life
68
+ });
69
+ }
70
+ for (let i = 0; i < elementsCount.star; i++) {
71
+ const randomAngle = randomRange(angle.from * Math.PI / 180, angle.to * Math.PI / 180);
72
+ const randomSpeed = randomRange(4, 18);
73
+ const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
74
+ particles.push({
75
+ id: Math.random(),
76
+ size: randomRange(mainSize.from, mainSize.to),
77
+ type: 'main',
78
+ angle: randomAngle,
79
+ velocity: {
80
+ x: Math.cos(randomAngle) * randomSpeed * velocityMultiplier,
81
+ y: Math.sin(randomAngle) * randomSpeed
82
+ },
83
+ rotation: randomRange(rotation.from, rotation.to),
84
+ rotationSpeed: randomRange(-2, 2),
85
+ angularAcceleration: randomAngularAcceleration,
86
+ friction,
87
+ Component: MainIcon,
88
+ life
89
+ });
90
+ }
91
+ return particles;
92
+ };
93
+ exports.generateParticle = generateParticle;
94
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +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","CELEBRATION_VARIANTS","particles","i","spark","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;AAACI,OAAA,CAAAL,WAAA,GAAAA,WAAA;AAE3F,MAAMM,aAAa,GAAGA,CAACC,WAAiB,EAAEC,YAAoB,EAAEC,UAAkB,KAAK;EACrF,MAAM,CAACC,QAAQ,EAAEC,UAAU,CAAC,GAAGH,YAAY,CAACI,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAACC,MAAM,CAAC;EAClE,MAAM,CAACC,MAAM,EAAEC,QAAQ,CAAC,GAAGP,UAAU,CAACG,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAACC,MAAM,CAAC;EAE5D,MAAMG,WAAW,GAAGV,WAAW,CAACW,WAAW,CAAC,CAAC;E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mB,CAACQ,EAAE,CAAC;IAE/FN,SAAS,CAACS,IAAI,CAAC;MACbC,EAAE,EAAEjD,IAAI,CAACC,MAAM,CAAC,CAAC;MACjBiD,IAAI,EAAErD,WAAW,CAACoC,QAAQ,CAACU,IAAI,EAAEV,QAAQ,CAACY,EAAE,CAAC;MAC7CM,IAAI,EAAE,MAAM;MACZrB,KAAK,EAAEY,WAAW;MAClBU,QAAQ,EAAE;QACRC,CAAC,EAAErD,IAAI,CAACsD,GAAG,CAACZ,WAAW,CAAC,GAAGI,WAAW,GAAGZ,kBAAkB;QAC3DqB,CAAC,EAAEvD,IAAI,CAACwD,GAAG,CAACd,WAAW,CAAC,GAAGI;MAC7B,CAAC;MACDf,QAAQ,EAAElC,WAAW,CAACkC,QAAQ,CAACY,IAAI,EAAEZ,QAAQ,CAACc,EAAE,CAAC;MACjDY,aAAa,EAAE5D,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;MACjCwC,mBAAmB,EAAEU,yBAAyB;MAC9CZ,QAAQ;MACRuB,SAAS,EAAEhC,QAAQ;MACnBU;IACF,CAAC,CAAC;EACJ;EAEA,OAAOG,SAAS;AAClB,CAAC;AAACrC,OAAA,CAAAyB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ Celebrations: true
8
+ };
9
+ Object.defineProperty(exports, "Celebrations", {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _Celebrations.Celebrations;
13
+ }
14
+ });
15
+ var _Celebrations = require("./components/Celebrations.js");
16
+ var _types = require("./types.js");
17
+ Object.keys(_types).forEach(function (key) {
18
+ if (key === "default" || key === "__esModule") return;
19
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
20
+ if (key in exports && exports[key] === _types[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _types[key];
25
+ }
26
+ });
27
+ });
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_Celebrations","require","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../src","sources":["features/celebrations/index.ts"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CelebrationVariant = void 0;
7
+ let CelebrationVariant = exports.CelebrationVariant = /*#__PURE__*/function (CelebrationVariant) {
8
+ CelebrationVariant["FIRST_ATTEMPT"] = "firstAttempt";
9
+ CelebrationVariant["CORRECT"] = "correct";
10
+ CelebrationVariant["GBD"] = "gbd";
11
+ CelebrationVariant["CORRECT_FINISH_ASSIGNMENT"] = "correctFinishAssignment";
12
+ CelebrationVariant["GBD_FINISH_ASSIGNMENT"] = "gbdFinishAssignment";
13
+ return CelebrationVariant;
14
+ }({});
15
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CelebrationVariant","exports"],"sourceRoot":"../../../../src","sources":["features/celebrations/types.ts"],"mappings":";;;;;;IAAYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_ReceivedMessage","_SentMessage","_modelTypes","_jsxRuntime","e","__esModule","default","variantsMap","MessageVariant","SENT","SentMessage","RECEIVED","ReceivedMessage","ChatMessage","variant","props","Component","jsx","exports"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAAyE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAgBzE,MAAMG,WAAgE,GAAG;EACvE,CAACC,0BAAc,CAACC,IAAI,GAAGC,wBAAW;EAClC,CAACF,0BAAc,CAACG,QAAQ,GAAGC;AAC7B,CAAC;AAEM,MAAMC,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAE,GAAGC;AAAwB,CAAC,KAAK;EACtE,MAAMC,SAAS,GAAGT,WAAW,CAACO,OAAO,CAAC;EACtC,oBAAO,IAAAX,WAAA,CAAAc,GAAA,EAACD,SAAS;IAAA,GAAKD;EAAK,CAAG,CAAC;AACjC,CAAC;AAAAG,OAAA,CAAAL,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_ReceivedMessage","_SentMessage","_modelTypes","_jsxRuntime","e","__esModule","default","variantsMap","MessageVariant","SENT","SentMessage","RECEIVED","ReceivedMessage","ChatMessage","variant","props","Component","jsx","exports"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAAyE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAezE,MAAMG,WAAgE,GAAG;EACvE,CAACC,0BAAc,CAACC,IAAI,GAAGC,wBAAW;EAClC,CAACF,0BAAc,CAACG,QAAQ,GAAGC;AAC7B,CAAC;AAEM,MAAMC,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAE,GAAGC;AAAwB,CAAC,KAAK;EACtE,MAAMC,SAAS,GAAGT,WAAW,CAACO,OAAO,CAAC;EACtC,oBAAO,IAAAX,WAAA,CAAAc,GAAA,EAACD,SAAS;IAAA,GAAKD;EAAK,CAAG,CAAC;AACjC,CAAC;AAAAG,OAAA,CAAAL,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
9
9
  var _ChatbotIcon = require("../../../../shared/icons/ChatbotIcon.js");
10
10
  var _MessageTextToSpeech = require("./MessageTextToSpeech.js");
11
11
  var _modelTypes = require("../../types/model.types.js");
12
- var _ErrorSpottingButton = require("../../errorSpotting/ErrorSpottingButton.js");
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
14
  const ReceivedMessage = ({
@@ -19,8 +18,7 @@ const ReceivedMessage = ({
19
18
  isActive,
20
19
  audioStatus,
21
20
  renderer,
22
- withTextToSpeech = true,
23
- withErrorSpotting
21
+ withTextToSpeech = true
24
22
  }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
25
23
  style: styles.container,
26
24
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
@@ -31,15 +29,15 @@ const ReceivedMessage = ({
31
29
  })
32
30
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
33
31
  style: styles.message,
34
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
32
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
35
33
  style: [styles.messageText, {
36
34
  width: withTextToSpeech ? 240 : 305
37
35
  }],
38
- children: [renderer ? renderer({
36
+ children: renderer ? renderer({
39
37
  message,
40
38
  variant: _modelTypes.MessageVariant.RECEIVED,
41
39
  withTextToSpeech
42
- }) : message, !!withErrorSpotting && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ErrorSpottingButton.ErrorSpottingButton, {})]
40
+ }) : message
43
41
  }), withTextToSpeech && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageTextToSpeech.MessageTextToSpeech, {
44
42
  isActive: isActive,
45
43
  isLoading: isTextToSpeechPending,