@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.
- package/dist/commonjs/features/celebrations/components/Celebrations.js +51 -0
- package/dist/commonjs/features/celebrations/components/Celebrations.js.map +1 -0
- package/dist/commonjs/features/celebrations/components/Particle.js +84 -0
- package/dist/commonjs/features/celebrations/components/Particle.js.map +1 -0
- package/dist/commonjs/features/celebrations/components/ParticleBatch.js +45 -0
- package/dist/commonjs/features/celebrations/components/ParticleBatch.js.map +1 -0
- package/dist/commonjs/features/celebrations/components/Spark.js +23 -0
- package/dist/commonjs/features/celebrations/components/Spark.js.map +1 -0
- package/dist/commonjs/features/celebrations/config.js +199 -0
- package/dist/commonjs/features/celebrations/config.js.map +1 -0
- package/dist/commonjs/features/celebrations/helpers.js +94 -0
- package/dist/commonjs/features/celebrations/helpers.js.map +1 -0
- package/dist/commonjs/features/celebrations/index.js +28 -0
- package/dist/commonjs/features/celebrations/index.js.map +1 -0
- package/dist/commonjs/features/celebrations/types.js +15 -0
- package/dist/commonjs/features/celebrations/types.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -6
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +1 -12
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +1 -5
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js +7 -0
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +17 -28
- package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +117 -136
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +1 -0
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ThreadItem.js +8 -21
- package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/{ChatbotApi.js → api.js} +1 -16
- package/dist/commonjs/features/chatbot/model/api.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/messagesHelper.js +5 -1
- package/dist/commonjs/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/t2s.js +6 -0
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.js +45 -54
- package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/api.types.js +0 -4
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +58 -0
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +247 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +131 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +56 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +68 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js +53 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +47 -0
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +69 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +55 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +102 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +83 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +96 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js +44 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +233 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +63 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/model.js +34 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/model.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +91 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +107 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/constants.js +55 -0
- package/dist/commonjs/features/endOfAssignment/constants.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/helpers.js +64 -0
- package/dist/commonjs/features/endOfAssignment/helpers.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js +51 -0
- package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/index.js +40 -0
- package/dist/commonjs/features/endOfAssignment/index.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/model/model.js +53 -0
- package/dist/commonjs/features/endOfAssignment/model/model.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/types.js +33 -0
- package/dist/commonjs/features/endOfAssignment/types.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js +43 -0
- package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js +30 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +65 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js +29 -0
- package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js +32 -0
- package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js.map +1 -0
- package/dist/commonjs/index.js +24 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/effector/createEntityFieldStore.js +0 -4
- package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
- package/dist/commonjs/shared/icons/Halloween.js +54 -0
- package/dist/commonjs/shared/icons/Halloween.js.map +1 -0
- package/dist/commonjs/shared/icons/Pi.js +30 -0
- package/dist/commonjs/shared/icons/Pi.js.map +1 -0
- package/dist/commonjs/shared/icons/Star.js +30 -0
- package/dist/commonjs/shared/icons/Star.js.map +1 -0
- package/dist/commonjs/shared/icons/{StopIcon.js → Valentine.js} +9 -12
- package/dist/commonjs/shared/icons/Valentine.js.map +1 -0
- package/dist/commonjs/shared/icons/Winter.js +32 -0
- package/dist/commonjs/shared/icons/Winter.js.map +1 -0
- package/dist/commonjs/shared/icons/icon.types.js +0 -4
- package/dist/module/features/celebrations/components/Celebrations.js +45 -0
- package/dist/module/features/celebrations/components/Celebrations.js.map +1 -0
- package/dist/module/features/celebrations/components/Particle.js +76 -0
- package/dist/module/features/celebrations/components/Particle.js.map +1 -0
- package/dist/module/features/celebrations/components/ParticleBatch.js +38 -0
- package/dist/module/features/celebrations/components/ParticleBatch.js.map +1 -0
- package/dist/module/features/celebrations/components/Spark.js +17 -0
- package/dist/module/features/celebrations/components/Spark.js.map +1 -0
- package/dist/module/features/celebrations/config.js +194 -0
- package/dist/module/features/celebrations/config.js.map +1 -0
- package/dist/module/features/celebrations/helpers.js +87 -0
- package/dist/module/features/celebrations/helpers.js.map +1 -0
- package/dist/module/features/celebrations/index.js +5 -0
- package/dist/module/features/celebrations/index.js.map +1 -0
- package/dist/module/features/celebrations/types.js +11 -0
- package/dist/module/features/celebrations/types.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -6
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +1 -12
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +2 -6
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/index.js +1 -0
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +15 -26
- package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
- package/dist/module/features/chatbot/model/ChatBotModel.js +119 -138
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +1 -0
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/chatbot/model/ThreadItem.js +8 -21
- package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/module/features/chatbot/model/{ChatbotApi.js → api.js} +1 -16
- package/dist/module/features/chatbot/model/api.js.map +1 -0
- package/dist/module/features/chatbot/model/messagesHelper.js +5 -1
- package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/module/features/chatbot/model/t2s.js +7 -1
- package/dist/module/features/chatbot/model/t2s.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.js +45 -54
- package/dist/module/features/chatbot/model/translation.js.map +1 -1
- package/dist/module/features/chatbot/types/api.types.js +0 -2
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js +52 -0
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +241 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +124 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +50 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +62 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js +47 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/EOAModal.js +41 -0
- package/dist/module/features/endOfAssignment/components/EOAModal.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js +63 -0
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +49 -0
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +96 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +77 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js +89 -0
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js +38 -0
- package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +226 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +56 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/model.js +29 -0
- package/dist/module/features/endOfAssignment/components/Modal/model.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +85 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +100 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +1 -0
- package/dist/module/features/endOfAssignment/constants.js +51 -0
- package/dist/module/features/endOfAssignment/constants.js.map +1 -0
- package/dist/module/features/endOfAssignment/helpers.js +58 -0
- package/dist/module/features/endOfAssignment/helpers.js.map +1 -0
- package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js +46 -0
- package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js.map +1 -0
- package/dist/module/features/endOfAssignment/index.js +6 -0
- package/dist/module/features/endOfAssignment/index.js.map +1 -0
- package/dist/module/features/endOfAssignment/model/model.js +48 -0
- package/dist/module/features/endOfAssignment/model/model.js.map +1 -0
- package/dist/module/features/endOfAssignment/types.js +29 -0
- package/dist/module/features/endOfAssignment/types.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/EOABadge.js +37 -0
- package/dist/module/features/endOfAssignment/ui/EOABadge.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButton.js +24 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButton.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +58 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/SparkIcon.js +21 -0
- package/dist/module/features/endOfAssignment/ui/SparkIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js +24 -0
- package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js.map +1 -0
- package/dist/module/index.js +2 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/effector/createEntityFieldStore.js +0 -4
- package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
- package/dist/module/shared/icons/Halloween.js +47 -0
- package/dist/module/shared/icons/Halloween.js.map +1 -0
- package/dist/module/shared/icons/Pi.js +23 -0
- package/dist/module/shared/icons/Pi.js.map +1 -0
- package/dist/module/shared/icons/Star.js +23 -0
- package/dist/module/shared/icons/Star.js.map +1 -0
- package/dist/module/shared/icons/Valentine.js +23 -0
- package/dist/module/shared/icons/Valentine.js.map +1 -0
- package/dist/module/shared/icons/Winter.js +25 -0
- package/dist/module/shared/icons/Winter.js.map +1 -0
- package/dist/module/shared/icons/icon.types.js +0 -2
- package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts +10 -0
- package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts +19 -0
- package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts +26 -0
- package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts +4 -0
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/config.d.ts +167 -0
- package/dist/typescript/commonjs/features/celebrations/config.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts +6 -0
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/index.d.ts +3 -0
- package/dist/typescript/commonjs/features/celebrations/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/types.d.ts +11 -0
- package/dist/typescript/commonjs/features/celebrations/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +3 -4
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/{ChatBotThreadManager.d.ts → ChatBotMessageHandler.d.ts} +8 -11
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +14 -19
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +2 -3
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +6 -12
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
- package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +4 -3
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +4 -2
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +8 -7
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +11 -2
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +19 -26
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +15 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +12 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts +20 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts +3 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts +14 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts +41 -0
- package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts +9 -0
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts +27 -0
- package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts +14 -0
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +60 -0
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts +11 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts +10 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +14 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +2 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +0 -2
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Star.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Star.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +0 -2
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
- package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts +10 -0
- package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/Particle.d.ts +19 -0
- package/dist/typescript/module/features/celebrations/components/Particle.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts +26 -0
- package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts +4 -0
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/config.d.ts +167 -0
- package/dist/typescript/module/features/celebrations/config.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/helpers.d.ts +6 -0
- package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/index.d.ts +3 -0
- package/dist/typescript/module/features/celebrations/index.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/types.d.ts +11 -0
- package/dist/typescript/module/features/celebrations/types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +3 -4
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/{ChatBotThreadManager.d.ts → ChatBotMessageHandler.d.ts} +8 -11
- package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +14 -19
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +2 -3
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +6 -12
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
- package/dist/typescript/module/features/chatbot/model/api.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +4 -3
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts +4 -2
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.d.ts +8 -7
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +11 -2
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +19 -26
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +15 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +12 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +11 -0
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts +20 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts +3 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts +14 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/constants.d.ts +41 -0
- package/dist/typescript/module/features/endOfAssignment/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts +9 -0
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts +27 -0
- package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/index.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/index.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts +14 -0
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/types.d.ts +60 -0
- package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts +11 -0
- package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts +10 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +14 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +2 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +0 -2
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/Halloween.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Halloween.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Pi.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Pi.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Star.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Star.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Valentine.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Valentine.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Winter.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Winter.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/icon.types.d.ts +0 -2
- package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/features/celebrations/components/Celebrations.tsx +62 -0
- package/src/features/celebrations/components/Particle.tsx +99 -0
- package/src/features/celebrations/components/ParticleBatch.tsx +56 -0
- package/src/features/celebrations/components/Spark.tsx +14 -0
- package/src/features/celebrations/config.ts +199 -0
- package/src/features/celebrations/helpers.ts +96 -0
- package/src/features/celebrations/index.ts +2 -0
- package/src/features/celebrations/types.ts +11 -0
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +0 -1
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +0 -3
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +0 -14
- package/src/features/chatbot/components/Chatbot.tsx +2 -3
- package/src/features/chatbot/index.ts +3 -3
- package/src/features/chatbot/model/{ChatBotThreadManager.ts → ChatBotMessageHandler.ts} +16 -28
- package/src/features/chatbot/model/ChatBotModel.ts +124 -123
- package/src/features/chatbot/model/DefaultMessageCreator.ts +3 -3
- package/src/features/chatbot/model/ThreadItem.ts +9 -20
- package/src/features/chatbot/model/{ChatbotApi.ts → api.ts} +2 -19
- package/src/features/chatbot/model/messagesHelper.ts +6 -2
- package/src/features/chatbot/model/t2s.ts +10 -3
- package/src/features/chatbot/model/translation.helpers.ts +1 -2
- package/src/features/chatbot/model/translation.ts +46 -52
- package/src/features/chatbot/types/api.types.ts +12 -2
- package/src/features/chatbot/types/model.types.ts +26 -38
- package/src/features/chatbot/types/translation.types.ts +1 -2
- package/src/features/endOfAssignment/components/CheatDetected/CheatDetected.tsx +48 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +293 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +128 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.tsx +39 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.tsx +40 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/Spark.tsx +45 -0
- package/src/features/endOfAssignment/components/EOAModal.tsx +64 -0
- package/src/features/endOfAssignment/components/ExamLeave/ExamLeave.tsx +56 -0
- package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +46 -0
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +102 -0
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.tsx +69 -0
- package/src/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/src/features/endOfAssignment/components/Modal/Modal.tsx +105 -0
- package/src/features/endOfAssignment/components/Modal/ModalBackground.tsx +33 -0
- package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +196 -0
- package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +62 -0
- package/src/features/endOfAssignment/components/Modal/model.ts +34 -0
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +85 -0
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswerContent.tsx +107 -0
- package/src/features/endOfAssignment/constants.ts +53 -0
- package/src/features/endOfAssignment/helpers.ts +28 -0
- package/src/features/endOfAssignment/hooks/useSparkAnimation.tsx +78 -0
- package/src/features/endOfAssignment/index.ts +3 -0
- package/src/features/endOfAssignment/model/model.ts +57 -0
- package/src/features/endOfAssignment/types.ts +65 -0
- package/src/features/endOfAssignment/ui/EOABadge.tsx +47 -0
- package/src/features/endOfAssignment/ui/PracticeButton.tsx +27 -0
- package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +75 -0
- package/src/features/endOfAssignment/ui/SparkIcon.tsx +15 -0
- package/src/features/endOfAssignment/ui/ThumbUpIcon.tsx +17 -0
- package/src/index.ts +2 -0
- package/src/lib/effector/createEntityFieldStore.ts +1 -9
- package/src/shared/icons/Halloween.tsx +33 -0
- package/src/shared/icons/Pi.tsx +16 -0
- package/src/shared/icons/Star.tsx +16 -0
- package/src/shared/icons/Valentine.tsx +16 -0
- package/src/shared/icons/Winter.tsx +19 -0
- package/src/shared/icons/icon.types.ts +6 -9
- package/dist/commonjs/features/chatbot/context/ChatBotContext.js +0 -17
- package/dist/commonjs/features/chatbot/context/ChatBotContext.js.map +0 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -58
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -99
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -110
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +0 -1
- package/dist/commonjs/features/chatbot/types/units.types.js +0 -2
- package/dist/commonjs/features/chatbot/types/units.types.js.map +0 -1
- package/dist/commonjs/lib/helpers/randomElements.js +0 -24
- package/dist/commonjs/lib/helpers/randomElements.js.map +0 -1
- package/dist/commonjs/shared/icons/HighlighterIcon.js +0 -36
- package/dist/commonjs/shared/icons/HighlighterIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/StopIcon.js.map +0 -1
- package/dist/module/features/chatbot/context/ChatBotContext.js +0 -12
- package/dist/module/features/chatbot/context/ChatBotContext.js.map +0 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -52
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -94
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -104
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +0 -1
- package/dist/module/features/chatbot/types/units.types.js +0 -2
- package/dist/module/features/chatbot/types/units.types.js.map +0 -1
- package/dist/module/lib/helpers/randomElements.js +0 -20
- package/dist/module/lib/helpers/randomElements.js.map +0 -1
- package/dist/module/shared/icons/HighlighterIcon.js +0 -29
- package/dist/module/shared/icons/HighlighterIcon.js.map +0 -1
- package/dist/module/shared/icons/StopIcon.js +0 -26
- package/dist/module/shared/icons/StopIcon.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotContext.d.ts +0 -8
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotContext.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -3
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -28
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -26
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -31
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts +0 -2
- package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/context/ChatBotContext.d.ts +0 -8
- package/dist/typescript/module/features/chatbot/context/ChatBotContext.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -3
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -28
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -26
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -31
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +0 -1
- package/dist/typescript/module/lib/helpers/randomElements.d.ts +0 -2
- package/dist/typescript/module/lib/helpers/randomElements.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/StopIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +0 -1
- package/src/features/chatbot/context/ChatBotContext.ts +0 -18
- package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +0 -53
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +0 -116
- package/src/features/chatbot/model/ChatsCacheModel.ts +0 -94
- package/src/features/chatbot/types/units.types.ts +0 -34
- package/src/lib/helpers/randomElements.ts +0 -22
- package/src/shared/icons/HighlighterIcon.tsx +0 -21
- package/src/shared/icons/StopIcon.tsx +0 -17
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Animated, {
|
|
3
|
+
useAnimatedStyle,
|
|
4
|
+
useSharedValue,
|
|
5
|
+
useAnimatedReaction,
|
|
6
|
+
runOnJS,
|
|
7
|
+
} from 'react-native-reanimated'
|
|
8
|
+
import { StyleSheet } from 'react-native'
|
|
9
|
+
|
|
10
|
+
export type ParticleProps = {
|
|
11
|
+
onAnimationEnd?: () => void
|
|
12
|
+
children: React.ReactElement
|
|
13
|
+
initialPreset: {
|
|
14
|
+
xOffset: number
|
|
15
|
+
rotation: number
|
|
16
|
+
rotationSpeed: number
|
|
17
|
+
velocity: {
|
|
18
|
+
x: number
|
|
19
|
+
y: number
|
|
20
|
+
}
|
|
21
|
+
angularAcceleration: number
|
|
22
|
+
friction: number
|
|
23
|
+
life: number
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const Particle = ({
|
|
28
|
+
onAnimationEnd,
|
|
29
|
+
children,
|
|
30
|
+
initialPreset: {
|
|
31
|
+
xOffset,
|
|
32
|
+
velocity,
|
|
33
|
+
rotationSpeed,
|
|
34
|
+
rotation,
|
|
35
|
+
angularAcceleration,
|
|
36
|
+
friction,
|
|
37
|
+
life,
|
|
38
|
+
},
|
|
39
|
+
}: ParticleProps) => {
|
|
40
|
+
const particleState = useSharedValue({
|
|
41
|
+
x: 0,
|
|
42
|
+
y: 0,
|
|
43
|
+
opacity: 1,
|
|
44
|
+
rotation,
|
|
45
|
+
velocity: { x: velocity.x, y: velocity.y },
|
|
46
|
+
life,
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
50
|
+
return {
|
|
51
|
+
left: particleState.value.x + xOffset,
|
|
52
|
+
top: particleState.value.y,
|
|
53
|
+
opacity: particleState.value.opacity,
|
|
54
|
+
transform: [{ rotate: `${(particleState.value.rotation * Math.PI) / 180}rad` }],
|
|
55
|
+
}
|
|
56
|
+
}, [particleState])
|
|
57
|
+
|
|
58
|
+
const animationFinished = () => {
|
|
59
|
+
onAnimationEnd?.()
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
useAnimatedReaction(
|
|
63
|
+
() => particleState.value,
|
|
64
|
+
(state) => {
|
|
65
|
+
const newVelocity = {
|
|
66
|
+
x: state.velocity.x * friction,
|
|
67
|
+
y: state.velocity.y * friction,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const currentSpeed = Math.sqrt(newVelocity.x ** 2 + newVelocity.y ** 2)
|
|
71
|
+
const angle = Math.atan2(newVelocity.y, newVelocity.x)
|
|
72
|
+
const newAngle = angle + angularAcceleration
|
|
73
|
+
newVelocity.x = Math.cos(newAngle) * currentSpeed
|
|
74
|
+
newVelocity.y = Math.sin(newAngle) * currentSpeed
|
|
75
|
+
|
|
76
|
+
particleState.value = {
|
|
77
|
+
x: state.x + newVelocity.x,
|
|
78
|
+
y: state.y + newVelocity.y,
|
|
79
|
+
opacity: state.life / (life / 2),
|
|
80
|
+
rotation: state.rotation + rotationSpeed,
|
|
81
|
+
velocity: newVelocity,
|
|
82
|
+
life: state.life - 1,
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (state.opacity <= 0) {
|
|
86
|
+
runOnJS(animationFinished)()
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
[particleState],
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return <Animated.View style={[styles.icon, animatedStyle]}>{children}</Animated.View>
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const styles = StyleSheet.create({
|
|
96
|
+
icon: {
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
},
|
|
99
|
+
})
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { useState, useEffect, ComponentType } from 'react'
|
|
2
|
+
import { IconProps } from '@magmamath/react-native-ui'
|
|
3
|
+
import { CELEBRATION_VARIANTS } from '../config'
|
|
4
|
+
import { generateParticle } from '../helpers'
|
|
5
|
+
import { Particle } from './Particle'
|
|
6
|
+
import { CelebrationVariant } from '../types'
|
|
7
|
+
|
|
8
|
+
export type ParticlesBatch = {
|
|
9
|
+
id: number
|
|
10
|
+
type: 'main' | 'spark'
|
|
11
|
+
angle: number
|
|
12
|
+
velocity: {
|
|
13
|
+
x: number
|
|
14
|
+
y: number
|
|
15
|
+
}
|
|
16
|
+
angularAcceleration: number
|
|
17
|
+
friction: number
|
|
18
|
+
Component: ComponentType<IconProps>
|
|
19
|
+
rotation: number
|
|
20
|
+
rotationSpeed: number
|
|
21
|
+
size: number
|
|
22
|
+
life: number
|
|
23
|
+
}
|
|
24
|
+
export type ParticleBatchProps = {
|
|
25
|
+
containerWidth: number
|
|
26
|
+
onAnimationEnd: () => void
|
|
27
|
+
variant: CelebrationVariant
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const ParticleBatch = ({ containerWidth, onAnimationEnd, variant }: ParticleBatchProps) => {
|
|
31
|
+
const [particles, setParticles] = useState<ParticlesBatch[]>([])
|
|
32
|
+
const { color } = CELEBRATION_VARIANTS[variant]
|
|
33
|
+
const xOffset = containerWidth ? containerWidth / 2 : 0
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
setParticles(generateParticle(variant))
|
|
37
|
+
}, [])
|
|
38
|
+
|
|
39
|
+
return particles.map((p, i) => (
|
|
40
|
+
<Particle
|
|
41
|
+
key={p.id}
|
|
42
|
+
onAnimationEnd={i === 0 ? onAnimationEnd : undefined}
|
|
43
|
+
initialPreset={{
|
|
44
|
+
velocity: p.velocity,
|
|
45
|
+
angularAcceleration: p.angularAcceleration,
|
|
46
|
+
friction: p.friction,
|
|
47
|
+
rotationSpeed: p.rotationSpeed,
|
|
48
|
+
rotation: p.rotation,
|
|
49
|
+
life: p.life,
|
|
50
|
+
xOffset,
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
{<p.Component size={p.size} color={color} />}
|
|
54
|
+
</Particle>
|
|
55
|
+
))
|
|
56
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IconProps } from '@magmamath/react-native-ui';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
|
|
5
|
+
export const Spark = ({ size = 10, color }: IconProps) => (
|
|
6
|
+
<View
|
|
7
|
+
style={{
|
|
8
|
+
width: size,
|
|
9
|
+
height: size,
|
|
10
|
+
backgroundColor: color,
|
|
11
|
+
borderRadius: size / 2,
|
|
12
|
+
}}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import StarIcon from '../../shared/icons/Star';
|
|
2
|
+
import HalloweenIcon from '../../shared/icons/Halloween';
|
|
3
|
+
import PiIcon from '../../shared/icons/Pi';
|
|
4
|
+
import WinterIcon from '../../shared/icons/Winter';
|
|
5
|
+
import ValentineIcon from '../../shared/icons/Valentine';
|
|
6
|
+
import { COLORS } from '@magmamath/react-native-ui';
|
|
7
|
+
import { CelebrationVariant } from './types';
|
|
8
|
+
|
|
9
|
+
export const CELEBRATION_ICON_CONFIG = [
|
|
10
|
+
{
|
|
11
|
+
name: 'default',
|
|
12
|
+
Icon: StarIcon,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'pi-day',
|
|
16
|
+
Icon: PiIcon,
|
|
17
|
+
activePeriod: {
|
|
18
|
+
start: '14-03',
|
|
19
|
+
end: '14-03',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'valentine',
|
|
24
|
+
Icon: ValentineIcon,
|
|
25
|
+
activePeriod: {
|
|
26
|
+
start: '07-02',
|
|
27
|
+
end: '15-02',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'halloween',
|
|
32
|
+
Icon: HalloweenIcon,
|
|
33
|
+
activePeriod: {
|
|
34
|
+
start: '20-10',
|
|
35
|
+
end: '01-11',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'winter',
|
|
40
|
+
Icon: WinterIcon,
|
|
41
|
+
activePeriod: {
|
|
42
|
+
start: '01-12',
|
|
43
|
+
end: '07-01',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
export const CELEBRATION_VARIANTS = {
|
|
49
|
+
[CelebrationVariant.FIRST_ATTEMPT]: {
|
|
50
|
+
color: COLORS.PRIMARY_GREEN,
|
|
51
|
+
elementsCount: {
|
|
52
|
+
star: 5,
|
|
53
|
+
spark: 4,
|
|
54
|
+
},
|
|
55
|
+
sparkSize: {
|
|
56
|
+
from: 4,
|
|
57
|
+
to: 9,
|
|
58
|
+
},
|
|
59
|
+
mainSize: {
|
|
60
|
+
from: 14,
|
|
61
|
+
to: 20,
|
|
62
|
+
},
|
|
63
|
+
angle: {
|
|
64
|
+
from: 230,
|
|
65
|
+
to: 280,
|
|
66
|
+
},
|
|
67
|
+
velocityMultiplier: 1,
|
|
68
|
+
rotation: {
|
|
69
|
+
from: 0,
|
|
70
|
+
to: 10,
|
|
71
|
+
},
|
|
72
|
+
friction: 0.907,
|
|
73
|
+
angularAcceleration: {
|
|
74
|
+
from: -0.05,
|
|
75
|
+
to: 0.05,
|
|
76
|
+
},
|
|
77
|
+
life: 65,
|
|
78
|
+
},
|
|
79
|
+
[CelebrationVariant.CORRECT]: {
|
|
80
|
+
color: COLORS.PRIMARY_YELLOW,
|
|
81
|
+
elementsCount: {
|
|
82
|
+
star: 4,
|
|
83
|
+
spark: 3,
|
|
84
|
+
},
|
|
85
|
+
sparkSize: {
|
|
86
|
+
from: 4,
|
|
87
|
+
to: 9,
|
|
88
|
+
},
|
|
89
|
+
mainSize: {
|
|
90
|
+
from: 14,
|
|
91
|
+
to: 20,
|
|
92
|
+
},
|
|
93
|
+
angle: {
|
|
94
|
+
from: 235,
|
|
95
|
+
to: 270,
|
|
96
|
+
},
|
|
97
|
+
velocityMultiplier: 1,
|
|
98
|
+
rotation: {
|
|
99
|
+
from: 0,
|
|
100
|
+
to: 10,
|
|
101
|
+
},
|
|
102
|
+
friction: 0.907,
|
|
103
|
+
angularAcceleration: {
|
|
104
|
+
from: -0.05,
|
|
105
|
+
to: 0.05,
|
|
106
|
+
},
|
|
107
|
+
life: 65,
|
|
108
|
+
},
|
|
109
|
+
[CelebrationVariant.GBD]: {
|
|
110
|
+
color: COLORS.PRIMARY_ORANGE,
|
|
111
|
+
elementsCount: {
|
|
112
|
+
star: 14,
|
|
113
|
+
spark: 12,
|
|
114
|
+
},
|
|
115
|
+
sparkSize: {
|
|
116
|
+
from: 6,
|
|
117
|
+
to: 12,
|
|
118
|
+
},
|
|
119
|
+
mainSize: {
|
|
120
|
+
from: 33,
|
|
121
|
+
to: 44,
|
|
122
|
+
},
|
|
123
|
+
angle: {
|
|
124
|
+
from: 30,
|
|
125
|
+
to: 330,
|
|
126
|
+
},
|
|
127
|
+
velocityMultiplier: 2,
|
|
128
|
+
rotation: {
|
|
129
|
+
from: 5,
|
|
130
|
+
to: 10,
|
|
131
|
+
},
|
|
132
|
+
friction: 0.925,
|
|
133
|
+
angularAcceleration: {
|
|
134
|
+
from: -0.03,
|
|
135
|
+
to: 0.03,
|
|
136
|
+
},
|
|
137
|
+
life: 120,
|
|
138
|
+
},
|
|
139
|
+
[CelebrationVariant.GBD_FINISH_ASSIGNMENT]: {
|
|
140
|
+
color: COLORS.PRIMARY_ORANGE,
|
|
141
|
+
elementsCount: {
|
|
142
|
+
star: 20,
|
|
143
|
+
spark: 16,
|
|
144
|
+
},
|
|
145
|
+
sparkSize: {
|
|
146
|
+
from: 4,
|
|
147
|
+
to: 16,
|
|
148
|
+
},
|
|
149
|
+
mainSize: {
|
|
150
|
+
from: 16,
|
|
151
|
+
to: 32,
|
|
152
|
+
},
|
|
153
|
+
angle: {
|
|
154
|
+
from: 180,
|
|
155
|
+
to: 360,
|
|
156
|
+
},
|
|
157
|
+
velocityMultiplier: 1.8,
|
|
158
|
+
rotation: {
|
|
159
|
+
from: 0,
|
|
160
|
+
to: 10,
|
|
161
|
+
},
|
|
162
|
+
friction: 0.95,
|
|
163
|
+
angularAcceleration: {
|
|
164
|
+
from: -0.05,
|
|
165
|
+
to: 0.05,
|
|
166
|
+
},
|
|
167
|
+
life: 100,
|
|
168
|
+
},
|
|
169
|
+
[CelebrationVariant.CORRECT_FINISH_ASSIGNMENT]: {
|
|
170
|
+
color: COLORS.PRIMARY_GREEN,
|
|
171
|
+
elementsCount: {
|
|
172
|
+
star: 20,
|
|
173
|
+
spark: 16,
|
|
174
|
+
},
|
|
175
|
+
sparkSize: {
|
|
176
|
+
from: 4,
|
|
177
|
+
to: 16,
|
|
178
|
+
},
|
|
179
|
+
mainSize: {
|
|
180
|
+
from: 16,
|
|
181
|
+
to: 32,
|
|
182
|
+
},
|
|
183
|
+
angle: {
|
|
184
|
+
from: 180,
|
|
185
|
+
to: 360,
|
|
186
|
+
},
|
|
187
|
+
velocityMultiplier: 1.8,
|
|
188
|
+
rotation: {
|
|
189
|
+
from: 0,
|
|
190
|
+
to: 10,
|
|
191
|
+
},
|
|
192
|
+
friction: 0.95,
|
|
193
|
+
angularAcceleration: {
|
|
194
|
+
from: -0.05,
|
|
195
|
+
to: 0.05,
|
|
196
|
+
},
|
|
197
|
+
life: 100,
|
|
198
|
+
},
|
|
199
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ParticlesBatch } from './components/ParticleBatch';
|
|
2
|
+
import { Spark } from './components/Spark';
|
|
3
|
+
import { CELEBRATION_ICON_CONFIG, CELEBRATION_VARIANTS } from './config';
|
|
4
|
+
import { CelebrationVariant } from './types';
|
|
5
|
+
|
|
6
|
+
export const randomRange = (min: number, max: number) => Math.random() * (max - min) + min;
|
|
7
|
+
|
|
8
|
+
const isDateInRange = (currentDate: Date, startDateStr: string, endDateStr: string) => {
|
|
9
|
+
const [startDay, startMonth] = startDateStr.split('-').map(Number);
|
|
10
|
+
const [endDay, endMonth] = endDateStr.split('-').map(Number);
|
|
11
|
+
|
|
12
|
+
const currentYear = currentDate.getFullYear();
|
|
13
|
+
const startDate = new Date(currentYear, startMonth - 1, startDay);
|
|
14
|
+
const endDate = new Date(currentYear, endMonth - 1, endDay + 1);
|
|
15
|
+
|
|
16
|
+
return currentDate >= startDate && currentDate <= endDate;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const getIconForCurrentDate = () => {
|
|
20
|
+
const currentDate = new Date();
|
|
21
|
+
|
|
22
|
+
for (const celebration of CELEBRATION_ICON_CONFIG) {
|
|
23
|
+
if (celebration.activePeriod) {
|
|
24
|
+
const { start, end } = celebration.activePeriod;
|
|
25
|
+
if (isDateInRange(currentDate, start, end)) {
|
|
26
|
+
return celebration.Icon;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return CELEBRATION_ICON_CONFIG[0].Icon;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const MainIcon = getIconForCurrentDate();
|
|
35
|
+
export const generateParticle = (variant: CelebrationVariant) => {
|
|
36
|
+
const {
|
|
37
|
+
elementsCount,
|
|
38
|
+
angle,
|
|
39
|
+
rotation,
|
|
40
|
+
sparkSize,
|
|
41
|
+
mainSize,
|
|
42
|
+
velocityMultiplier,
|
|
43
|
+
friction,
|
|
44
|
+
life,
|
|
45
|
+
angularAcceleration,
|
|
46
|
+
} = CELEBRATION_VARIANTS[variant];
|
|
47
|
+
|
|
48
|
+
const particles: ParticlesBatch[] = [];
|
|
49
|
+
|
|
50
|
+
for (let i = 0; i < elementsCount.spark; i++) {
|
|
51
|
+
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180);
|
|
52
|
+
const randomSpeed = randomRange(4, 18);
|
|
53
|
+
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
|
|
54
|
+
|
|
55
|
+
particles.push({
|
|
56
|
+
id: Math.random(),
|
|
57
|
+
size: randomRange(sparkSize.from, sparkSize.to),
|
|
58
|
+
type: 'spark',
|
|
59
|
+
angle: randomAngle,
|
|
60
|
+
velocity: {
|
|
61
|
+
x: Math.cos(randomAngle) * randomSpeed * velocityMultiplier,
|
|
62
|
+
y: Math.sin(randomAngle) * randomSpeed,
|
|
63
|
+
},
|
|
64
|
+
rotation: 0,
|
|
65
|
+
rotationSpeed: 0,
|
|
66
|
+
angularAcceleration: randomAngularAcceleration,
|
|
67
|
+
friction,
|
|
68
|
+
Component: Spark,
|
|
69
|
+
life,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
for (let i = 0; i < elementsCount.star; i++) {
|
|
73
|
+
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180);
|
|
74
|
+
const randomSpeed = randomRange(4, 18);
|
|
75
|
+
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
|
|
76
|
+
|
|
77
|
+
particles.push({
|
|
78
|
+
id: Math.random(),
|
|
79
|
+
size: randomRange(mainSize.from, mainSize.to),
|
|
80
|
+
type: 'main',
|
|
81
|
+
angle: randomAngle,
|
|
82
|
+
velocity: {
|
|
83
|
+
x: Math.cos(randomAngle) * randomSpeed * velocityMultiplier,
|
|
84
|
+
y: Math.sin(randomAngle) * randomSpeed,
|
|
85
|
+
},
|
|
86
|
+
rotation: randomRange(rotation.from, rotation.to),
|
|
87
|
+
rotationSpeed: randomRange(-2, 2),
|
|
88
|
+
angularAcceleration: randomAngularAcceleration,
|
|
89
|
+
friction,
|
|
90
|
+
Component: MainIcon,
|
|
91
|
+
life,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return particles;
|
|
96
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export enum CelebrationVariant {
|
|
2
|
+
FIRST_ATTEMPT = 'firstAttempt',
|
|
3
|
+
CORRECT = 'correct',
|
|
4
|
+
GBD = 'gbd',
|
|
5
|
+
CORRECT_FINISH_ASSIGNMENT = 'correctFinishAssignment',
|
|
6
|
+
GBD_FINISH_ASSIGNMENT = 'gbdFinishAssignment',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type CelebrationsRef = {
|
|
10
|
+
play: (variant: CelebrationVariant) => void;
|
|
11
|
+
} | null;
|
|
@@ -4,7 +4,6 @@ import { VariantProps } from './ChatMessage'
|
|
|
4
4
|
import { ChatbotIcon } from '../../../../shared/icons/ChatbotIcon'
|
|
5
5
|
import { MessageTextToSpeech } from './MessageTextToSpeech'
|
|
6
6
|
import { MessageVariant } from '../../types/model.types'
|
|
7
|
-
import { ErrorSpottingButton } from '../../errorSpotting/ErrorSpottingButton'
|
|
8
7
|
|
|
9
8
|
export const ReceivedMessage = ({
|
|
10
9
|
message,
|
|
@@ -14,7 +13,6 @@ export const ReceivedMessage = ({
|
|
|
14
13
|
audioStatus,
|
|
15
14
|
renderer,
|
|
16
15
|
withTextToSpeech = true,
|
|
17
|
-
withErrorSpotting,
|
|
18
16
|
}: VariantProps) => (
|
|
19
17
|
<View style={styles.container}>
|
|
20
18
|
<View style={styles.icon}>
|
|
@@ -26,7 +24,6 @@ export const ReceivedMessage = ({
|
|
|
26
24
|
{renderer
|
|
27
25
|
? renderer({ message, variant: MessageVariant.RECEIVED, withTextToSpeech })
|
|
28
26
|
: message}
|
|
29
|
-
{!!withErrorSpotting && <ErrorSpottingButton />}
|
|
30
27
|
</Text>
|
|
31
28
|
{withTextToSpeech && (
|
|
32
29
|
<MessageTextToSpeech
|
|
@@ -7,7 +7,6 @@ import { MessageLoader } from '../ChatMessage/MessageLoader'
|
|
|
7
7
|
import { Alternatives } from '../Alternatives/Alternatives'
|
|
8
8
|
import { AUDIO_CONFIG, DEFAULT_VOICE, TEXT_TO_SPEECH_CONFIG } from '../../constants'
|
|
9
9
|
import { MessageVariant, ChatbotRenderer } from '../../types/model.types'
|
|
10
|
-
import { ConversationMessage } from '../../types/units.types'
|
|
11
10
|
|
|
12
11
|
type ChatbotMessagesProps = {
|
|
13
12
|
model: ChatbotModel
|
|
@@ -27,16 +26,6 @@ const BOTTOM_OFFSET = Platform.select({
|
|
|
27
26
|
default: 294,
|
|
28
27
|
})
|
|
29
28
|
|
|
30
|
-
function findListReceivedMessage(messages: ConversationMessage[]) {
|
|
31
|
-
let i = messages.length - 1
|
|
32
|
-
while (i >= 2) {
|
|
33
|
-
const message = messages[i]
|
|
34
|
-
if (!message.isOwnMessage && !message.endMessage) return messages[i]
|
|
35
|
-
i--
|
|
36
|
-
}
|
|
37
|
-
return null
|
|
38
|
-
}
|
|
39
|
-
|
|
40
29
|
export const ChatbotMessages = ({
|
|
41
30
|
model,
|
|
42
31
|
isHintFeedback,
|
|
@@ -74,8 +63,6 @@ export const ChatbotMessages = ({
|
|
|
74
63
|
void model.sendHelpRequestFx({ message, translatedMessage })
|
|
75
64
|
}
|
|
76
65
|
|
|
77
|
-
const lastReceivedMessage = findListReceivedMessage(messages)
|
|
78
|
-
|
|
79
66
|
return (
|
|
80
67
|
<View style={[styles.container, { maxHeight: MAX_HEIGHT }]}>
|
|
81
68
|
<ScrollView
|
|
@@ -102,7 +89,6 @@ export const ChatbotMessages = ({
|
|
|
102
89
|
isTextToSpeechPending={isTextToSpeechPending}
|
|
103
90
|
variant={isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED}
|
|
104
91
|
withTextToSpeech={isTextToSpeechEnabled && !isOwnMessage}
|
|
105
|
-
withErrorSpotting={!isHelpRequestPending && lastReceivedMessage?.id === id}
|
|
106
92
|
/>
|
|
107
93
|
))}
|
|
108
94
|
|
|
@@ -6,7 +6,6 @@ import { ChatControls } from './ChatControls/ChatControls'
|
|
|
6
6
|
import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants'
|
|
7
7
|
import { ChatbotRenderer } from '../types/model.types'
|
|
8
8
|
import React from 'react'
|
|
9
|
-
import { ChatBotContext } from '../context/ChatBotContext'
|
|
10
9
|
|
|
11
10
|
type ChatbotProps = {
|
|
12
11
|
model: ChatbotModel
|
|
@@ -49,7 +48,7 @@ export const Chatbot = ({
|
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
return (
|
|
52
|
-
|
|
51
|
+
<>
|
|
53
52
|
<ChatbotMessages
|
|
54
53
|
model={model}
|
|
55
54
|
renderer={renderer}
|
|
@@ -68,6 +67,6 @@ export const Chatbot = ({
|
|
|
68
67
|
ButtonWrapper={ButtonWrapper}
|
|
69
68
|
iconSize={iconSize}
|
|
70
69
|
/>
|
|
71
|
-
|
|
70
|
+
</>
|
|
72
71
|
)
|
|
73
72
|
}
|
|
@@ -3,11 +3,11 @@ export { ChatbotModel } from './model/ChatBotModel'
|
|
|
3
3
|
export { AudioStatus, type AudioProvider } from './types/t2s.types'
|
|
4
4
|
export {
|
|
5
5
|
MessageVariant,
|
|
6
|
+
type ConversationMessage,
|
|
6
7
|
type ChatbotRenderer,
|
|
7
8
|
type ChatbotModelProps,
|
|
8
9
|
type IChatDrawBoardAdapter,
|
|
9
10
|
} from './types/model.types'
|
|
10
|
-
export type { PostMessageResponse } from './types/api.types'
|
|
11
|
+
export type { PostMessageResponse, ChatAnswer } from './types/api.types'
|
|
12
|
+
export { ChatMessageHandler } from './model/ChatBotMessageHandler'
|
|
11
13
|
export { DefaultMessagesCreator } from './model/DefaultMessageCreator'
|
|
12
|
-
export type { ChatAnswer } from './types/units.types'
|
|
13
|
-
export type { ConversationMessage } from './types/units.types'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ThreadItem } from './ThreadItem'
|
|
2
|
-
import {
|
|
2
|
+
import { Store } from 'effector'
|
|
3
|
+
import { createEffect } from 'effector/effector.umd'
|
|
3
4
|
import {
|
|
4
5
|
ChatHintPayload,
|
|
5
6
|
ChatHintResponse,
|
|
@@ -9,10 +10,10 @@ import {
|
|
|
9
10
|
import { ChatbotMessages, IChatDrawBoardAdapter } from '../types/model.types'
|
|
10
11
|
import { CHAT_BOT_MODEL_DEFAULTS } from './constants'
|
|
11
12
|
|
|
12
|
-
type
|
|
13
|
+
type ChatMessageHandlerProps = {
|
|
13
14
|
messagesLimit?: number
|
|
14
|
-
drawBoardAdapter?: IChatDrawBoardAdapter
|
|
15
15
|
messages: ChatbotMessages
|
|
16
|
+
drawBoardAdapter: IChatDrawBoardAdapter
|
|
16
17
|
api: {
|
|
17
18
|
getHint: (props: ChatHintPayload) => Promise<ChatHintResponse>
|
|
18
19
|
}
|
|
@@ -22,13 +23,11 @@ type ResetCacheProps = {
|
|
|
22
23
|
key: string
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
export class
|
|
26
|
+
export class ChatMessageHandler {
|
|
26
27
|
private readonly api
|
|
27
|
-
private drawBoardAdapter: IChatDrawBoardAdapter
|
|
28
|
+
private readonly drawBoardAdapter: IChatDrawBoardAdapter
|
|
28
29
|
private readonly threads = new Map<string, ThreadItem>()
|
|
29
30
|
|
|
30
|
-
public readonly $threads = createStore(new Map<string, ThreadItem>())
|
|
31
|
-
|
|
32
31
|
private readonly messagesLimit
|
|
33
32
|
private currentKey = ''
|
|
34
33
|
private currentBinding: null | (() => void) = null
|
|
@@ -40,9 +39,9 @@ export class ChatBotThreadManager {
|
|
|
40
39
|
api,
|
|
41
40
|
messagesLimit = CHAT_BOT_MODEL_DEFAULTS.THREAD_MESSAGES_LIMIT,
|
|
42
41
|
messages,
|
|
43
|
-
}:
|
|
42
|
+
}: ChatMessageHandlerProps) {
|
|
44
43
|
this.api = api
|
|
45
|
-
this.drawBoardAdapter = drawBoardAdapter
|
|
44
|
+
this.drawBoardAdapter = drawBoardAdapter
|
|
46
45
|
this.messagesLimit = messagesLimit
|
|
47
46
|
this.defaultMessages = messages
|
|
48
47
|
}
|
|
@@ -59,16 +58,9 @@ export class ChatBotThreadManager {
|
|
|
59
58
|
const key = this.currentKey
|
|
60
59
|
let threadItem = this.threads.get(key)
|
|
61
60
|
if (threadItem) return threadItem
|
|
62
|
-
if (!this.drawBoardAdapter) {
|
|
63
|
-
threadItem = new ThreadItem()
|
|
64
|
-
this.threads.set(key, threadItem)
|
|
65
|
-
return threadItem
|
|
66
|
-
}
|
|
67
61
|
try {
|
|
68
|
-
const
|
|
69
|
-
threadItem = new ThreadItem(
|
|
70
|
-
result ? { strokes: result.strokes, key: result.validationKey } : null,
|
|
71
|
-
)
|
|
62
|
+
const strokes = await this.drawBoardAdapter.getVisibleStrokes()
|
|
63
|
+
threadItem = new ThreadItem({ strokes })
|
|
72
64
|
} catch {
|
|
73
65
|
threadItem = new ThreadItem()
|
|
74
66
|
}
|
|
@@ -76,11 +68,7 @@ export class ChatBotThreadManager {
|
|
|
76
68
|
return threadItem
|
|
77
69
|
}
|
|
78
70
|
|
|
79
|
-
public
|
|
80
|
-
this.drawBoardAdapter = adapter
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
public readonly postMessage = async ({
|
|
71
|
+
public readonly postMessageFx = async ({
|
|
84
72
|
problemAnswer,
|
|
85
73
|
problem,
|
|
86
74
|
answer,
|
|
@@ -98,21 +86,21 @@ export class ChatBotThreadManager {
|
|
|
98
86
|
imageAltText,
|
|
99
87
|
})
|
|
100
88
|
|
|
101
|
-
threadItem.
|
|
89
|
+
threadItem.hints.push(result.message)
|
|
102
90
|
const nextOptions =
|
|
103
|
-
threadItem.
|
|
91
|
+
threadItem.hints.length < this.messagesLimit ? [this.defaultMessages.anotherHintOption] : []
|
|
104
92
|
|
|
105
93
|
return {
|
|
106
94
|
message: result.message,
|
|
107
95
|
options: nextOptions,
|
|
96
|
+
threadId: '',
|
|
108
97
|
endMessage: !nextOptions.length,
|
|
109
|
-
thread: threadItem.toObject(),
|
|
110
98
|
}
|
|
111
99
|
}
|
|
112
100
|
|
|
113
|
-
public resetThread = ({ key }: ResetCacheProps) => {
|
|
101
|
+
public resetThread = createEffect(({ key }: ResetCacheProps) => {
|
|
114
102
|
this.threads.delete(key)
|
|
115
|
-
}
|
|
103
|
+
})
|
|
116
104
|
|
|
117
105
|
public resetAll() {
|
|
118
106
|
this.threads.clear()
|