@magmamath/students-features 0.6.1-8.rc-3 → 0.6.2
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/README.md +5 -14
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +2 -6
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +24 -27
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +4 -9
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +5 -18
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +3 -10
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +12 -16
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -13
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +8 -14
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +4 -14
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +2 -5
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js +1 -2
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +1 -36
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -8
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js +0 -7
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +36 -64
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +8 -3
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +0 -9
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +0 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.js +1 -9
- package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +0 -2
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
- package/dist/commonjs/features/feedback/model/comments.js +3 -5
- package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
- package/dist/commonjs/features/feedback/model/model.js +9 -7
- package/dist/commonjs/features/feedback/model/model.js.map +1 -1
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js +4 -5
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js +9 -12
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js.map +1 -1
- package/dist/commonjs/features/problemSelector/constants.js +6 -3
- package/dist/commonjs/features/problemSelector/constants.js.map +1 -1
- package/dist/commonjs/index.js +0 -36
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/effector/createControllerEffect.js.map +1 -1
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/commonjs/shared/icons/LockIcon.js +31 -0
- package/dist/commonjs/shared/icons/LockIcon.js.map +1 -0
- package/dist/commonjs/shared/translation/constants.js +1 -5
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/en.json +0 -11
- package/dist/commonjs/shared/translation/localization/gb.json +0 -11
- package/dist/commonjs/shared/translation/localization/sw.json +0 -11
- package/dist/commonjs/shared/translation/types.js +0 -2
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +2 -6
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +27 -29
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +4 -9
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +5 -18
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +3 -10
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +12 -16
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -13
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +8 -14
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +4 -14
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +2 -5
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js +3 -3
- package/dist/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +0 -35
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +1 -9
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -1
- package/dist/module/features/chatbot/index.js +0 -1
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +37 -65
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +8 -3
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js +0 -9
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +0 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.js +1 -9
- package/dist/module/features/chatbot/model/translation.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js +1 -3
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
- package/dist/module/features/feedback/model/comments.js +3 -5
- package/dist/module/features/feedback/model/comments.js.map +1 -1
- package/dist/module/features/feedback/model/model.js +9 -7
- package/dist/module/features/feedback/model/model.js.map +1 -1
- package/dist/module/features/formulaSheet/components/FormulaSheet.js +4 -5
- package/dist/module/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js +10 -13
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js.map +1 -1
- package/dist/module/features/problemSelector/constants.js +5 -2
- package/dist/module/features/problemSelector/constants.js.map +1 -1
- package/dist/module/index.js +0 -3
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/effector/createControllerEffect.js.map +1 -1
- package/dist/module/shared/icons/LockIcon.js +23 -0
- package/dist/module/shared/icons/LockIcon.js.map +1 -0
- package/dist/module/shared/translation/constants.js +1 -5
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/localization/en.json +0 -11
- package/dist/module/shared/translation/localization/gb.json +0 -11
- package/dist/module/shared/translation/localization/sw.json +0 -11
- package/dist/module/shared/translation/types.js +0 -2
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -5
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +1 -6
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts +2 -7
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts +1 -6
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +1 -5
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.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/ChatMessage/SentMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +1 -3
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +3 -4
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +0 -33
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +2 -7
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +3 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +0 -5
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +2 -5
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts +5 -2
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -3
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts +1 -1
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -99
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -22
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +1 -3
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +1 -5
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -5
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +1 -6
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts +2 -7
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts +1 -6
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +1 -5
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.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/ChatMessage/SentMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +1 -3
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +3 -4
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +0 -33
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +2 -7
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +3 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +0 -5
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +2 -5
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
- package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
- package/dist/typescript/module/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -1
- package/dist/typescript/module/features/problemSelector/constants.d.ts +5 -2
- package/dist/typescript/module/features/problemSelector/constants.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -3
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts +1 -1
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts.map +1 -1
- package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/LockIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/LockIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -99
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +0 -22
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +1 -3
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts +1 -5
- package/dist/typescript/module/shared/translation/validation.types.d.ts.map +1 -1
- package/package.json +7 -11
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +0 -6
- package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +29 -28
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +1 -6
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +4 -24
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +6 -39
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +3 -11
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +7 -28
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +5 -25
- package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +13 -24
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +3 -13
- package/src/features/chatbot/components/Chatbot.tsx +2 -6
- package/src/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.tsx +10 -7
- package/src/features/chatbot/constants.ts +0 -37
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +1 -11
- package/src/features/chatbot/index.ts +0 -1
- package/src/features/chatbot/model/ChatBotModel.ts +41 -65
- package/src/features/chatbot/model/ChatBotThreadManager.ts +10 -4
- package/src/features/chatbot/model/ChatBoxTextManager.ts +0 -11
- package/src/features/chatbot/model/DefaultMessageCreator.ts +0 -1
- package/src/features/chatbot/model/translation.ts +1 -11
- package/src/features/chatbot/types/model.types.ts +2 -5
- package/src/features/endOfAssignment/components/Modal/Modal.tsx +0 -3
- package/src/features/feedback/model/comments.ts +7 -7
- package/src/features/feedback/model/model.ts +6 -6
- package/src/features/formulaSheet/components/FormulaSheet.tsx +4 -6
- package/src/features/problemSelector/components/ProblemSelectorButton.tsx +10 -17
- package/src/features/problemSelector/constants.ts +2 -3
- package/src/index.ts +0 -3
- package/src/lib/effector/createControllerEffect.ts +41 -41
- package/src/lib/helpers/helpers.ts +1 -1
- package/src/shared/icons/LockIcon.tsx +16 -0
- package/src/shared/translation/constants.ts +0 -4
- package/src/shared/translation/localization/en.json +0 -11
- package/src/shared/translation/localization/gb.json +0 -11
- package/src/shared/translation/localization/sw.json +0 -11
- package/src/shared/translation/types.ts +0 -6
- package/src/shared/translation/validation.types.ts +1 -9
- package/dist/commonjs/features/chatbot/types/style.types.js +0 -12
- package/dist/commonjs/features/chatbot/types/style.types.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js +0 -29
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -104
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js +0 -44
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js +0 -61
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +0 -68
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +0 -101
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/constants.js +0 -13
- package/dist/commonjs/features/exampleSolution/constants.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js +0 -61
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/index.js +0 -39
- package/dist/commonjs/features/exampleSolution/index.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +0 -24
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js +0 -32
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js +0 -18
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/types.js +0 -6
- package/dist/commonjs/features/exampleSolution/types.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js +0 -62
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/assets/confetti.webp +0 -0
- package/dist/commonjs/features/gifCelebrations/assets/gifFallback.gif +0 -0
- package/dist/commonjs/features/gifCelebrations/components/Backdrop.js +0 -44
- package/dist/commonjs/features/gifCelebrations/components/Backdrop.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js +0 -46
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/components/Gif.js +0 -90
- package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/components/Progress.js +0 -96
- package/dist/commonjs/features/gifCelebrations/components/Progress.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/constants.js +0 -34
- package/dist/commonjs/features/gifCelebrations/constants.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/helpers.js +0 -114
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/index.js +0 -20
- package/dist/commonjs/features/gifCelebrations/index.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js +0 -136
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js +0 -27
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsCache.js +0 -30
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsCache.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/types/model.types.js +0 -6
- package/dist/commonjs/features/gifCelebrations/types/model.types.js.map +0 -1
- package/dist/commonjs/lib/effector/ControlledSample.js +0 -40
- package/dist/commonjs/lib/effector/ControlledSample.js.map +0 -1
- package/dist/commonjs/react-app-env.d.js +0 -2
- package/dist/commonjs/react-app-env.d.js.map +0 -1
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js +0 -681
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js +0 -616
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js.map +0 -1
- package/dist/commonjs/shared/icons/index.js +0 -204
- package/dist/commonjs/shared/icons/index.js.map +0 -1
- package/dist/commonjs/shared/translation/localization/ca.json +0 -33
- package/dist/commonjs/shared/translation/localization/sct.json +0 -33
- package/dist/commonjs/types/common.types.js +0 -2
- package/dist/commonjs/types/common.types.js.map +0 -1
- package/dist/module/features/chatbot/types/style.types.js +0 -8
- package/dist/module/features/chatbot/types/style.types.js.map +0 -1
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js +0 -23
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +0 -1
- package/dist/module/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -98
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +0 -1
- package/dist/module/features/exampleSolution/components/LavaIcon.js +0 -36
- package/dist/module/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/module/features/exampleSolution/components/MessageBlock.js +0 -53
- package/dist/module/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/module/features/exampleSolution/components/QuestionSection.js +0 -60
- package/dist/module/features/exampleSolution/components/QuestionSection.js.map +0 -1
- package/dist/module/features/exampleSolution/components/SolutionSection.js +0 -93
- package/dist/module/features/exampleSolution/components/SolutionSection.js.map +0 -1
- package/dist/module/features/exampleSolution/constants.js +0 -9
- package/dist/module/features/exampleSolution/constants.js.map +0 -1
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js +0 -56
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js.map +0 -1
- package/dist/module/features/exampleSolution/index.js +0 -6
- package/dist/module/features/exampleSolution/index.js.map +0 -1
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +0 -19
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +0 -1
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js +0 -27
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js.map +0 -1
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js +0 -13
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js.map +0 -1
- package/dist/module/features/exampleSolution/types.js +0 -4
- package/dist/module/features/exampleSolution/types.js.map +0 -1
- package/dist/module/features/gifCelebrations/GifCelebrations.js +0 -55
- package/dist/module/features/gifCelebrations/GifCelebrations.js.map +0 -1
- package/dist/module/features/gifCelebrations/assets/confetti.webp +0 -0
- package/dist/module/features/gifCelebrations/assets/gifFallback.gif +0 -0
- package/dist/module/features/gifCelebrations/components/Backdrop.js +0 -36
- package/dist/module/features/gifCelebrations/components/Backdrop.js.map +0 -1
- package/dist/module/features/gifCelebrations/components/ContentContainer.js +0 -38
- package/dist/module/features/gifCelebrations/components/ContentContainer.js.map +0 -1
- package/dist/module/features/gifCelebrations/components/Gif.js +0 -82
- package/dist/module/features/gifCelebrations/components/Gif.js.map +0 -1
- package/dist/module/features/gifCelebrations/components/Progress.js +0 -88
- package/dist/module/features/gifCelebrations/components/Progress.js.map +0 -1
- package/dist/module/features/gifCelebrations/constants.js +0 -30
- package/dist/module/features/gifCelebrations/constants.js.map +0 -1
- package/dist/module/features/gifCelebrations/helpers.js +0 -103
- package/dist/module/features/gifCelebrations/helpers.js.map +0 -1
- package/dist/module/features/gifCelebrations/index.js +0 -5
- package/dist/module/features/gifCelebrations/index.js.map +0 -1
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js +0 -131
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js +0 -22
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
- package/dist/module/features/gifCelebrations/model/GifCelebrationsCache.js +0 -25
- package/dist/module/features/gifCelebrations/model/GifCelebrationsCache.js.map +0 -1
- package/dist/module/features/gifCelebrations/types/model.types.js +0 -4
- package/dist/module/features/gifCelebrations/types/model.types.js.map +0 -1
- package/dist/module/lib/effector/ControlledSample.js +0 -35
- package/dist/module/lib/effector/ControlledSample.js.map +0 -1
- package/dist/module/react-app-env.d.js +0 -2
- package/dist/module/react-app-env.d.js.map +0 -1
- package/dist/module/shared/icons/ExcitedLavaIcon.js +0 -673
- package/dist/module/shared/icons/ExcitedLavaIcon.js.map +0 -1
- package/dist/module/shared/icons/LavaIconInGlasses.js +0 -608
- package/dist/module/shared/icons/LavaIconInGlasses.js.map +0 -1
- package/dist/module/shared/icons/index.js +0 -21
- package/dist/module/shared/icons/index.js.map +0 -1
- package/dist/module/shared/translation/localization/ca.json +0 -33
- package/dist/module/shared/translation/localization/sct.json +0 -33
- package/dist/module/types/common.types.js +0 -2
- package/dist/module/types/common.types.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/types/style.types.d.ts +0 -5
- package/dist/typescript/commonjs/features/chatbot/types/style.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts +0 -11
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +0 -8
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts +0 -9
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts +0 -6
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts +0 -9
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts +0 -4
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts +0 -13
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts +0 -11
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +0 -27
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts +0 -26
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +0 -29
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts +0 -3
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -25
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -7
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsCache.d.ts +0 -18
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsCache.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts +0 -45
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/effector/ControlledSample.d.ts +0 -17
- package/dist/typescript/commonjs/lib/effector/ControlledSample.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/index.d.ts +0 -19
- package/dist/typescript/commonjs/shared/icons/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +0 -5
- package/dist/typescript/commonjs/types/common.types.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/types/style.types.d.ts +0 -5
- package/dist/typescript/module/features/chatbot/types/style.types.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts +0 -11
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +0 -8
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts +0 -9
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/constants.d.ts +0 -6
- package/dist/typescript/module/features/exampleSolution/constants.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts +0 -9
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/index.d.ts +0 -4
- package/dist/typescript/module/features/exampleSolution/index.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts +0 -13
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts +0 -11
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/types.d.ts +0 -27
- package/dist/typescript/module/features/exampleSolution/types.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts +0 -26
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +0 -29
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/index.d.ts +0 -3
- package/dist/typescript/module/features/gifCelebrations/index.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -25
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -7
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsCache.d.ts +0 -18
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsCache.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts +0 -45
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts.map +0 -1
- package/dist/typescript/module/lib/effector/ControlledSample.d.ts +0 -17
- package/dist/typescript/module/lib/effector/ControlledSample.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts +0 -4
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/index.d.ts +0 -19
- package/dist/typescript/module/shared/icons/index.d.ts.map +0 -1
- package/dist/typescript/module/types/common.types.d.ts +0 -5
- package/dist/typescript/module/types/common.types.d.ts.map +0 -1
- package/src/features/chatbot/types/style.types.ts +0 -4
- package/src/features/exampleSolution/ExampleSolutionModal.tsx +0 -23
- package/src/features/exampleSolution/assets/grid.webp +0 -0
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +0 -83
- package/src/features/exampleSolution/components/LavaIcon.tsx +0 -35
- package/src/features/exampleSolution/components/MessageBlock.tsx +0 -67
- package/src/features/exampleSolution/components/QuestionSection.tsx +0 -60
- package/src/features/exampleSolution/components/SolutionSection.tsx +0 -112
- package/src/features/exampleSolution/constants.ts +0 -5
- package/src/features/exampleSolution/hooks/useExampleSolution.ts +0 -66
- package/src/features/exampleSolution/index.ts +0 -3
- package/src/features/exampleSolution/model/ExampleSolution.model.ts +0 -15
- package/src/features/exampleSolution/model/ExampleSolutionApi.ts +0 -33
- package/src/features/exampleSolution/model/ExampleSolutionCache.ts +0 -20
- package/src/features/exampleSolution/types.ts +0 -27
- package/src/features/gifCelebrations/GifCelebrations.tsx +0 -75
- package/src/features/gifCelebrations/assets/confetti.webp +0 -0
- package/src/features/gifCelebrations/assets/gifFallback.gif +0 -0
- package/src/features/gifCelebrations/components/Backdrop.tsx +0 -41
- package/src/features/gifCelebrations/components/ContentContainer.tsx +0 -44
- package/src/features/gifCelebrations/components/Gif.tsx +0 -88
- package/src/features/gifCelebrations/components/Progress.tsx +0 -106
- package/src/features/gifCelebrations/constants.ts +0 -32
- package/src/features/gifCelebrations/helpers.ts +0 -144
- package/src/features/gifCelebrations/index.ts +0 -2
- package/src/features/gifCelebrations/model/GifCelebrations.model.ts +0 -167
- package/src/features/gifCelebrations/model/GifCelebrationsApi.ts +0 -26
- package/src/features/gifCelebrations/model/GifCelebrationsCache.ts +0 -41
- package/src/features/gifCelebrations/types/model.types.ts +0 -53
- package/src/lib/effector/ControlledSample.ts +0 -40
- package/src/react-app-env.d.ts +0 -6
- package/src/shared/icons/ExcitedLavaIcon.tsx +0 -541
- package/src/shared/icons/LavaIconInGlasses.tsx +0 -489
- package/src/shared/icons/index.ts +0 -18
- package/src/shared/translation/localization/ca.json +0 -33
- package/src/shared/translation/localization/sct.json +0 -33
- package/src/types/common.types.ts +0 -4
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Store } from 'effector';
|
|
2
|
-
export type CustomGetCachePathMethod = (uri: string) => Promise<string | null>;
|
|
3
|
-
export type CustomPrefetchMethod = (gifs: string[] | string) => Promise<unknown>;
|
|
4
|
-
export type CustomLocalStorage = {
|
|
5
|
-
setItem: (key: string, value: string) => void;
|
|
6
|
-
getItem: (key: string) => string | null | undefined;
|
|
7
|
-
};
|
|
8
|
-
export type GroupNumber = number;
|
|
9
|
-
export type GifCelebrationApiRequests = {
|
|
10
|
-
getGifs: () => Promise<GifResponse>;
|
|
11
|
-
};
|
|
12
|
-
export type GifCelebrationsModelProps = {
|
|
13
|
-
api: GifCelebrationApiRequests;
|
|
14
|
-
problemsAmount: Store<number>;
|
|
15
|
-
resolvedProblemsAmount: Store<number>;
|
|
16
|
-
customLocalStorage?: CustomLocalStorage;
|
|
17
|
-
customPrefetchMethod?: CustomPrefetchMethod;
|
|
18
|
-
customGetCachePathMethod?: CustomGetCachePathMethod;
|
|
19
|
-
};
|
|
20
|
-
export type GifsGroup = string[];
|
|
21
|
-
export type GroupNumberString = `group${GroupNumber}`;
|
|
22
|
-
export type GifsGroups = Record<GroupNumberString, GifsGroup>;
|
|
23
|
-
export type GifObject = {
|
|
24
|
-
url: string;
|
|
25
|
-
group: GroupNumberString;
|
|
26
|
-
isShown?: boolean;
|
|
27
|
-
};
|
|
28
|
-
export type GifsStructure = Record<GroupNumberString, GifObject[]>;
|
|
29
|
-
/**
|
|
30
|
-
* Usually, the response contains 3 groups of gifs:
|
|
31
|
-
* - group1: early celebrations
|
|
32
|
-
* - group2: mid celebrations
|
|
33
|
-
* - group3: party
|
|
34
|
-
*/
|
|
35
|
-
export type GifResponse = {
|
|
36
|
-
data: GifsGroups;
|
|
37
|
-
ok: boolean;
|
|
38
|
-
};
|
|
39
|
-
export type GifsPayload = {
|
|
40
|
-
group: number;
|
|
41
|
-
};
|
|
42
|
-
export type ProblemsGifsTable = Record<number, GifObject>;
|
|
43
|
-
export type ProgressValue = 0 | 1 | 2;
|
|
44
|
-
export type TextComponentType = (text: string) => React.ReactNode;
|
|
45
|
-
//# sourceMappingURL=model.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/types/model.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,MAAM,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;AAChF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACpD,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAEhC,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,yBAAyB,CAAA;IAC9B,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC7B,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;CACpD,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,CAAA;AAChC,MAAM,MAAM,iBAAiB,GAAG,QAAQ,WAAW,EAAE,CAAA;AACrD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAA;AAE7D,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,iBAAiB,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,iBAAiB,EAAE,SAAS,EAAE,CAAC,CAAA;AAClE;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,UAAU,CAAA;IAChB,EAAE,EAAE,OAAO,CAAA;CACZ,CAAA;AACD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AACzD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAErC,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Store, Effect, Event } from 'effector';
|
|
2
|
-
type ControlledSampleParams<S = any, R = void> = {
|
|
3
|
-
clock: (Event<any> | Effect<any, any, any>)[];
|
|
4
|
-
source: Store<S>;
|
|
5
|
-
target: Effect<R, any, any>;
|
|
6
|
-
isActiveDefault?: boolean;
|
|
7
|
-
filter?: (payload: S, isActive: boolean) => boolean;
|
|
8
|
-
fn?: (payload: S, isActive: boolean) => R;
|
|
9
|
-
};
|
|
10
|
-
export declare class ControlledSample<S = any, R = void> {
|
|
11
|
-
readonly enable: import("effector").EventCallable<void>;
|
|
12
|
-
readonly disable: import("effector").EventCallable<void>;
|
|
13
|
-
readonly $isActive: Store<boolean>;
|
|
14
|
-
constructor({ clock, source, target, filter, fn, isActiveDefault, }: ControlledSampleParams<S, R>);
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=ControlledSample.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ControlledSample.d.ts","sourceRoot":"","sources":["../../../../../src/lib/effector/ControlledSample.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,EAAU,MAAM,EAAW,KAAK,EAAE,MAAM,UAAU,CAAA;AAE1F,KAAK,sBAAsB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,IAAI;IAC/C,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAA;IAC7C,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;IAChB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAA;IACnD,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,KAAK,CAAC,CAAA;CAC1C,CAAA;AAED,qBAAa,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI;IAC7C,SAAgB,MAAM,yCAAgB;IACtC,SAAgB,OAAO,yCAAgB;IAEvC,SAAgB,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;gBAE7B,EACV,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAA2C,EAC3C,EAAoD,EACpD,eAAuB,GACxB,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC;CAehC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExcitedLavaIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/ExcitedLavaIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,eAAO,MAAM,eAAe,sBAAkC,SAAS,sBAwhBtE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LavaIconInGlasses.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/LavaIconInGlasses.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,eAAO,MAAM,iBAAiB,sBAAkC,SAAS,sBA4dxE,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export * from './ArrowRightIcon';
|
|
2
|
-
export * from './ChatbotIcon';
|
|
3
|
-
export * from './CloseIcon';
|
|
4
|
-
export * from './ExcitedLavaIcon';
|
|
5
|
-
export * from './GlobeIcon';
|
|
6
|
-
export * from './Halloween';
|
|
7
|
-
export * from './HighlighterIcon';
|
|
8
|
-
export * from './LavaIconInGlasses';
|
|
9
|
-
export * from './MessageBubbleIcon';
|
|
10
|
-
export * from './PauseIcon';
|
|
11
|
-
export * from './Pi';
|
|
12
|
-
export * from './PlayIcon';
|
|
13
|
-
export * from './SpeakerIcon';
|
|
14
|
-
export * from './Star';
|
|
15
|
-
export * from './StopIcon';
|
|
16
|
-
export * from './Valentine';
|
|
17
|
-
export * from './Winter';
|
|
18
|
-
export * from './XCloseIcon';
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,MAAM,CAAA;AACpB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../../../src/types/common.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { BaseModal, SPACING } from '@magmamath/react-native-ui'
|
|
3
|
-
import { ExampleSolutionModalContent } from './components/ExampleSolutionModalContent'
|
|
4
|
-
import { ExampleSolutionModalParams } from './types'
|
|
5
|
-
|
|
6
|
-
type ExampleSolutionModalComponentProps = {
|
|
7
|
-
modal: {
|
|
8
|
-
closeModal: () => void
|
|
9
|
-
params: ExampleSolutionModalParams
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const ExampleSolutionModal = ({
|
|
14
|
-
modal: { closeModal, params },
|
|
15
|
-
}: ExampleSolutionModalComponentProps) => (
|
|
16
|
-
<BaseModal
|
|
17
|
-
style={{
|
|
18
|
-
container: { paddingHorizontal: SPACING[800] },
|
|
19
|
-
}}
|
|
20
|
-
onClose={closeModal}
|
|
21
|
-
content={<ExampleSolutionModalContent params={params} />}
|
|
22
|
-
/>
|
|
23
|
-
)
|
|
Binary file
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { StyleSheet, View } from 'react-native'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { COLORS, HeadingVariants, IS_WEB, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
-
import { useUnit } from 'effector-react'
|
|
5
|
-
import { $localization } from '../../../shared/translation'
|
|
6
|
-
import { MessageBlock } from './MessageBlock'
|
|
7
|
-
import { LavaIcon } from './LavaIcon'
|
|
8
|
-
import { ExampleSolutionModalParams } from '../types'
|
|
9
|
-
import { QuestionSection } from './QuestionSection'
|
|
10
|
-
import { SolutionSection } from './SolutionSection'
|
|
11
|
-
import { useExampleSolution } from '../hooks/useExampleSolution'
|
|
12
|
-
|
|
13
|
-
type ExampleSolutionModalContentProps = {
|
|
14
|
-
params: ExampleSolutionModalParams
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const CONTAINER_HEIGHT = 593
|
|
18
|
-
|
|
19
|
-
export const ExampleSolutionModalContent = ({
|
|
20
|
-
params: { model, payload, cacheKey },
|
|
21
|
-
}: ExampleSolutionModalContentProps) => {
|
|
22
|
-
const { result, status } = useExampleSolution({ model, payload, cacheKey })
|
|
23
|
-
const localization = useUnit($localization)
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<View
|
|
27
|
-
style={[
|
|
28
|
-
styles.container,
|
|
29
|
-
IS_WEB ? { maxHeight: CONTAINER_HEIGHT } : { height: CONTAINER_HEIGHT },
|
|
30
|
-
]}
|
|
31
|
-
>
|
|
32
|
-
<Typography align="center" variant={HeadingVariants.H2} style={{ color: COLORS.NEUTRAL_9 }}>
|
|
33
|
-
{localization.exampleSolution.exampleSolution}
|
|
34
|
-
</Typography>
|
|
35
|
-
<View style={styles.content}>
|
|
36
|
-
<QuestionSection
|
|
37
|
-
status={status}
|
|
38
|
-
question={result?.question}
|
|
39
|
-
renderKatexComponent={model.renderKatexComponent}
|
|
40
|
-
/>
|
|
41
|
-
<SolutionSection status={status} answer={result?.answer} />
|
|
42
|
-
</View>
|
|
43
|
-
<MessageBlock status={status} style={styles.messageBlock} />
|
|
44
|
-
<LavaIcon status={status} style={styles.lavaIconContainer} />
|
|
45
|
-
</View>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const styles = StyleSheet.create({
|
|
50
|
-
container: {
|
|
51
|
-
width: 880,
|
|
52
|
-
},
|
|
53
|
-
content: {
|
|
54
|
-
flex: 1,
|
|
55
|
-
flexDirection: 'row',
|
|
56
|
-
marginTop: SPACING[400],
|
|
57
|
-
gap: SPACING[400],
|
|
58
|
-
},
|
|
59
|
-
solutionContainer: {
|
|
60
|
-
width: 351,
|
|
61
|
-
overflow: 'hidden',
|
|
62
|
-
borderRadius: 8,
|
|
63
|
-
borderWidth: 1,
|
|
64
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
65
|
-
},
|
|
66
|
-
lavaIconContainer: {
|
|
67
|
-
position: 'absolute',
|
|
68
|
-
bottom: -24,
|
|
69
|
-
right: -26,
|
|
70
|
-
},
|
|
71
|
-
loaderContainer: {
|
|
72
|
-
paddingTop: 34,
|
|
73
|
-
position: 'absolute',
|
|
74
|
-
width: '100%',
|
|
75
|
-
height: '100%',
|
|
76
|
-
backgroundColor: COLORS.NEUTRAL_1,
|
|
77
|
-
},
|
|
78
|
-
messageBlock: {
|
|
79
|
-
position: 'absolute',
|
|
80
|
-
right: 58,
|
|
81
|
-
bottom: -12,
|
|
82
|
-
},
|
|
83
|
-
})
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { ExcitedLavaIcon } from '../../../shared/icons/ExcitedLavaIcon'
|
|
3
|
-
import { LavaIconInGlasses } from '../../../shared/icons'
|
|
4
|
-
import Animated, { FadeIn, useAnimatedStyle, withTiming } from 'react-native-reanimated'
|
|
5
|
-
import { StyleProp, ViewStyle } from 'react-native'
|
|
6
|
-
import { ExampleSolutionStatuses } from '../constants'
|
|
7
|
-
|
|
8
|
-
const LAVA_ICON_HEIGHT = 112
|
|
9
|
-
|
|
10
|
-
type LavaIconProps = {
|
|
11
|
-
status: ExampleSolutionStatuses
|
|
12
|
-
style?: StyleProp<ViewStyle>
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const LavaIcon = ({ status, style }: LavaIconProps) => {
|
|
16
|
-
const opacityAnimation = useAnimatedStyle(() => {
|
|
17
|
-
return {
|
|
18
|
-
opacity: withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, { duration: 500 }),
|
|
19
|
-
}
|
|
20
|
-
}, [status])
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<>
|
|
24
|
-
<Animated.View style={[style, opacityAnimation]}>
|
|
25
|
-
<LavaIconInGlasses height={112} />
|
|
26
|
-
</Animated.View>
|
|
27
|
-
|
|
28
|
-
{status !== ExampleSolutionStatuses.LOADING && (
|
|
29
|
-
<Animated.View style={style} entering={FadeIn}>
|
|
30
|
-
<ExcitedLavaIcon height={LAVA_ICON_HEIGHT} />
|
|
31
|
-
</Animated.View>
|
|
32
|
-
)}
|
|
33
|
-
</>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { StyleProp, StyleSheet, ViewStyle } from 'react-native'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { COLORS, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
-
import { useUnit } from 'effector-react'
|
|
5
|
-
import { $localization } from '../../../shared/translation'
|
|
6
|
-
import Animated, {
|
|
7
|
-
LinearTransition,
|
|
8
|
-
useAnimatedStyle,
|
|
9
|
-
withDelay,
|
|
10
|
-
withTiming,
|
|
11
|
-
} from 'react-native-reanimated'
|
|
12
|
-
import { ExampleSolutionStatuses } from '../constants'
|
|
13
|
-
|
|
14
|
-
type MessageBlockProps = {
|
|
15
|
-
status: ExampleSolutionStatuses
|
|
16
|
-
style?: StyleProp<ViewStyle>
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const MessageBlock = ({ status, style }: MessageBlockProps) => {
|
|
20
|
-
const localization = useUnit($localization)
|
|
21
|
-
|
|
22
|
-
const opacityAnimation = useAnimatedStyle(() => {
|
|
23
|
-
return {
|
|
24
|
-
opacity: withDelay(
|
|
25
|
-
2000,
|
|
26
|
-
withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, { duration: 350 }),
|
|
27
|
-
),
|
|
28
|
-
}
|
|
29
|
-
}, [status])
|
|
30
|
-
|
|
31
|
-
if (status === ExampleSolutionStatuses.CACHE) return null
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<Animated.View
|
|
35
|
-
layout={LinearTransition.duration(250)}
|
|
36
|
-
style={[styles.container, opacityAnimation, style]}
|
|
37
|
-
>
|
|
38
|
-
<Typography variant={'small'} numberOfLines={1}>
|
|
39
|
-
{status === ExampleSolutionStatuses.LOADING
|
|
40
|
-
? localization.exampleSolution.letMeThink
|
|
41
|
-
: localization.exampleSolution.aha}
|
|
42
|
-
</Typography>
|
|
43
|
-
</Animated.View>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const styles = StyleSheet.create({
|
|
48
|
-
container: {
|
|
49
|
-
padding: SPACING[200],
|
|
50
|
-
backgroundColor: COLORS.NEUTRAL_3,
|
|
51
|
-
height: 44,
|
|
52
|
-
borderRadius: 12,
|
|
53
|
-
borderBottomRightRadius: 2,
|
|
54
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
55
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
56
|
-
|
|
57
|
-
shadowColor: COLORS.NEUTRAL_10,
|
|
58
|
-
shadowOffset: {
|
|
59
|
-
width: 0,
|
|
60
|
-
height: 1,
|
|
61
|
-
},
|
|
62
|
-
shadowOpacity: 0.2,
|
|
63
|
-
shadowRadius: 1,
|
|
64
|
-
|
|
65
|
-
elevation: 3,
|
|
66
|
-
},
|
|
67
|
-
})
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { StyleSheet, View } from 'react-native'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { COLORS, Loader, LoaderColor, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
-
import Animated, { FadeOut } from 'react-native-reanimated'
|
|
5
|
-
import { ExampleSolutionStatuses } from '../constants'
|
|
6
|
-
|
|
7
|
-
type QuestionSectionProps = {
|
|
8
|
-
question?: string
|
|
9
|
-
status: ExampleSolutionStatuses
|
|
10
|
-
renderKatexComponent: (katexString: string) => React.ReactNode
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const QuestionSection = ({
|
|
14
|
-
question,
|
|
15
|
-
status,
|
|
16
|
-
renderKatexComponent,
|
|
17
|
-
}: QuestionSectionProps) => {
|
|
18
|
-
return (
|
|
19
|
-
<View style={styles.container}>
|
|
20
|
-
{question && <View style={styles.katexContainer}>{renderKatexComponent(question)}</View>}
|
|
21
|
-
{status === ExampleSolutionStatuses.LOADING && (
|
|
22
|
-
<Animated.View exiting={FadeOut} style={styles.loaderContainer}>
|
|
23
|
-
<Loader size="large" color={LoaderColor.BLUE} />
|
|
24
|
-
</Animated.View>
|
|
25
|
-
)}
|
|
26
|
-
</View>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const styles = StyleSheet.create({
|
|
31
|
-
container: {
|
|
32
|
-
flex: 1,
|
|
33
|
-
},
|
|
34
|
-
katexContainer: {
|
|
35
|
-
flex: 1,
|
|
36
|
-
},
|
|
37
|
-
loaderContainer: {
|
|
38
|
-
paddingTop: 34,
|
|
39
|
-
position: 'absolute',
|
|
40
|
-
zIndex: 100,
|
|
41
|
-
width: '100%',
|
|
42
|
-
height: '100%',
|
|
43
|
-
backgroundColor: COLORS.NEUTRAL_1,
|
|
44
|
-
justifyContent: 'flex-start',
|
|
45
|
-
alignItems: 'center',
|
|
46
|
-
},
|
|
47
|
-
errorContainer: {
|
|
48
|
-
position: 'absolute',
|
|
49
|
-
width: '100%',
|
|
50
|
-
height: '100%',
|
|
51
|
-
backgroundColor: COLORS.NEUTRAL_1,
|
|
52
|
-
justifyContent: 'center',
|
|
53
|
-
alignItems: 'center',
|
|
54
|
-
padding: SPACING[400],
|
|
55
|
-
},
|
|
56
|
-
errorText: {
|
|
57
|
-
color: COLORS.PRIMARY_RED,
|
|
58
|
-
textAlign: 'center',
|
|
59
|
-
},
|
|
60
|
-
})
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
StyleSheet,
|
|
3
|
-
View,
|
|
4
|
-
Image,
|
|
5
|
-
ImageBackground,
|
|
6
|
-
ScrollView,
|
|
7
|
-
useWindowDimensions,
|
|
8
|
-
} from 'react-native'
|
|
9
|
-
import React from 'react'
|
|
10
|
-
import { COLORS, IS_WEB, SPACING } from '@magmamath/react-native-ui'
|
|
11
|
-
import Animated, { FadeIn } from 'react-native-reanimated'
|
|
12
|
-
import { ExampleSolutionStatuses } from '../constants'
|
|
13
|
-
import gridImage from '../assets/grid.webp'
|
|
14
|
-
|
|
15
|
-
type SolutionSectionProps = {
|
|
16
|
-
answer?: string
|
|
17
|
-
status: ExampleSolutionStatuses
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const CONTAINER_SIZES = {
|
|
21
|
-
width: 489,
|
|
22
|
-
height: 543,
|
|
23
|
-
}
|
|
24
|
-
const BORDER_WIDTH = 1
|
|
25
|
-
const CONTAINER_HEIGHT_OFFSET = 160
|
|
26
|
-
|
|
27
|
-
const gridImagePath = !IS_WEB ? Image.resolveAssetSource(gridImage).uri : gridImage
|
|
28
|
-
|
|
29
|
-
export const SolutionSection = ({ answer, status }: SolutionSectionProps) => {
|
|
30
|
-
const { height } = useWindowDimensions()
|
|
31
|
-
|
|
32
|
-
const shouldShowAnswer =
|
|
33
|
-
answer &&
|
|
34
|
-
(status === ExampleSolutionStatuses.DONE_DATA || status === ExampleSolutionStatuses.CACHE)
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<View style={[styles.container, IS_WEB && { maxHeight: height - CONTAINER_HEIGHT_OFFSET }]}>
|
|
38
|
-
<ScrollView
|
|
39
|
-
style={styles.solutionScroll}
|
|
40
|
-
contentContainerStyle={styles.solutionScrollContent}
|
|
41
|
-
bounces
|
|
42
|
-
>
|
|
43
|
-
{IS_WEB ? (
|
|
44
|
-
<ImageBackground
|
|
45
|
-
resizeMode="repeat"
|
|
46
|
-
style={[styles.gridImageWeb]}
|
|
47
|
-
source={{ uri: gridImagePath }}
|
|
48
|
-
>
|
|
49
|
-
{shouldShowAnswer && (
|
|
50
|
-
<Animated.Text
|
|
51
|
-
entering={status === 'cache' ? undefined : FadeIn.delay(1000).duration(500)}
|
|
52
|
-
style={styles.solutionText}
|
|
53
|
-
>
|
|
54
|
-
{answer}
|
|
55
|
-
</Animated.Text>
|
|
56
|
-
)}
|
|
57
|
-
</ImageBackground>
|
|
58
|
-
) : (
|
|
59
|
-
<>
|
|
60
|
-
<ImageBackground
|
|
61
|
-
resizeMode="repeat"
|
|
62
|
-
style={styles.gridImageRn}
|
|
63
|
-
source={{ uri: gridImagePath }}
|
|
64
|
-
/>
|
|
65
|
-
{shouldShowAnswer && (
|
|
66
|
-
<Animated.Text
|
|
67
|
-
entering={status === 'cache' ? undefined : FadeIn.delay(1000).duration(500)}
|
|
68
|
-
style={styles.solutionText}
|
|
69
|
-
>
|
|
70
|
-
{answer}
|
|
71
|
-
</Animated.Text>
|
|
72
|
-
)}
|
|
73
|
-
</>
|
|
74
|
-
)}
|
|
75
|
-
</ScrollView>
|
|
76
|
-
</View>
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const styles = StyleSheet.create({
|
|
81
|
-
container: {
|
|
82
|
-
width: CONTAINER_SIZES.width,
|
|
83
|
-
height: CONTAINER_SIZES.height,
|
|
84
|
-
overflow: 'hidden',
|
|
85
|
-
borderRadius: 8,
|
|
86
|
-
borderWidth: BORDER_WIDTH,
|
|
87
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
88
|
-
},
|
|
89
|
-
gridImageRn: {
|
|
90
|
-
top: -327,
|
|
91
|
-
width: '100%',
|
|
92
|
-
height: '150%',
|
|
93
|
-
position: 'absolute',
|
|
94
|
-
},
|
|
95
|
-
gridImageWeb: {
|
|
96
|
-
width: '100%',
|
|
97
|
-
height: '100%',
|
|
98
|
-
},
|
|
99
|
-
solutionScroll: {
|
|
100
|
-
flex: 1,
|
|
101
|
-
},
|
|
102
|
-
solutionScrollContent: {
|
|
103
|
-
minHeight: CONTAINER_SIZES.height - BORDER_WIDTH * 2,
|
|
104
|
-
width: '100%',
|
|
105
|
-
},
|
|
106
|
-
solutionText: {
|
|
107
|
-
fontFamily: 'PlaypenSans-Light',
|
|
108
|
-
fontSize: 28,
|
|
109
|
-
marginHorizontal: SPACING[800],
|
|
110
|
-
marginVertical: SPACING[400],
|
|
111
|
-
},
|
|
112
|
-
})
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react'
|
|
2
|
-
import { useUnit } from 'effector-react'
|
|
3
|
-
import { ExampleSolutionModalParams, ExampleSolutionResponse } from '../types'
|
|
4
|
-
import { ExampleSolutionStatuses } from '../constants'
|
|
5
|
-
|
|
6
|
-
const ANIMATION_DELAY = 600
|
|
7
|
-
|
|
8
|
-
type UseExampleSolutionReturn = {
|
|
9
|
-
result: ExampleSolutionResponse | null
|
|
10
|
-
status: ExampleSolutionStatuses
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const useExampleSolution = ({
|
|
14
|
-
model,
|
|
15
|
-
payload,
|
|
16
|
-
cacheKey,
|
|
17
|
-
}: ExampleSolutionModalParams): UseExampleSolutionReturn => {
|
|
18
|
-
const exampleSolutionsCache = useUnit(model.cache.$state)
|
|
19
|
-
const [result, setResult] = useState<ExampleSolutionResponse | null>(null)
|
|
20
|
-
const [status, setStatus] = useState<ExampleSolutionStatuses>(ExampleSolutionStatuses.LOADING)
|
|
21
|
-
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
let timer: NodeJS.Timeout | null = null
|
|
24
|
-
|
|
25
|
-
const fetchExampleSolution = async () => {
|
|
26
|
-
try {
|
|
27
|
-
if (exampleSolutionsCache[cacheKey]) {
|
|
28
|
-
setResult(exampleSolutionsCache[cacheKey])
|
|
29
|
-
setStatus(ExampleSolutionStatuses.CACHE)
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const startTime = Date.now()
|
|
34
|
-
const response = await model.api.generateExampleSolutionFx(payload)
|
|
35
|
-
|
|
36
|
-
setResult(response)
|
|
37
|
-
model.cache.addExampleSolution({ cacheKey, response })
|
|
38
|
-
|
|
39
|
-
const elapsedTime = Date.now() - startTime
|
|
40
|
-
if (elapsedTime >= ANIMATION_DELAY) {
|
|
41
|
-
setStatus(ExampleSolutionStatuses.DONE_DATA)
|
|
42
|
-
} else {
|
|
43
|
-
timer = setTimeout(() => {
|
|
44
|
-
setStatus(ExampleSolutionStatuses.DONE_DATA)
|
|
45
|
-
}, ANIMATION_DELAY - elapsedTime)
|
|
46
|
-
}
|
|
47
|
-
} catch (error) {
|
|
48
|
-
console.error('Failed to fetch example solution:', error)
|
|
49
|
-
setStatus(ExampleSolutionStatuses.DONE_DATA)
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
fetchExampleSolution()
|
|
54
|
-
|
|
55
|
-
return () => {
|
|
56
|
-
if (timer) {
|
|
57
|
-
clearTimeout(timer)
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}, [])
|
|
61
|
-
|
|
62
|
-
return {
|
|
63
|
-
result,
|
|
64
|
-
status,
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ExampleSolutionModelProps } from '../types'
|
|
2
|
-
import { ExampleSolutionsApi } from './ExampleSolutionApi'
|
|
3
|
-
import { ExampleSolutionCache } from './ExampleSolutionCache'
|
|
4
|
-
|
|
5
|
-
export class ExampleSolutionModel {
|
|
6
|
-
public readonly api
|
|
7
|
-
public readonly cache = new ExampleSolutionCache()
|
|
8
|
-
|
|
9
|
-
public readonly renderKatexComponent: (katexString: string) => React.ReactNode
|
|
10
|
-
|
|
11
|
-
constructor({ api, errorHandler, renderKatexComponent }: ExampleSolutionModelProps) {
|
|
12
|
-
this.api = new ExampleSolutionsApi({ api, errorHandler })
|
|
13
|
-
this.renderKatexComponent = renderKatexComponent
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { createControllerEffect } from './../../../lib/effector/createControllerEffect'
|
|
2
|
-
import { ExampleSolutionApiRequests, ExampleSolutionErrorHandler } from '../types'
|
|
3
|
-
import { $localization } from '../../../shared/translation'
|
|
4
|
-
import { createEffect, sample, attach, StoreValue } from 'effector'
|
|
5
|
-
|
|
6
|
-
type ExampleSolutionApiProps = {
|
|
7
|
-
api: ExampleSolutionApiRequests
|
|
8
|
-
errorHandler?: ExampleSolutionErrorHandler
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export class ExampleSolutionsApi {
|
|
12
|
-
public readonly generateExampleSolutionFx
|
|
13
|
-
public readonly errorHandlerFx?: ExampleSolutionErrorHandler
|
|
14
|
-
|
|
15
|
-
public readonly errorHandlingFx = attach({
|
|
16
|
-
source: $localization,
|
|
17
|
-
effect: createEffect((localization: StoreValue<typeof $localization>) => {
|
|
18
|
-
if (!this.errorHandlerFx) return
|
|
19
|
-
const errorMessage = localization.exampleSolution.errorMessage
|
|
20
|
-
this.errorHandlerFx(errorMessage)
|
|
21
|
-
}),
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
constructor({ api, errorHandler }: ExampleSolutionApiProps) {
|
|
25
|
-
this.generateExampleSolutionFx = createControllerEffect(api.generateExampleSolution)
|
|
26
|
-
this.errorHandlerFx = errorHandler
|
|
27
|
-
|
|
28
|
-
sample({
|
|
29
|
-
clock: this.generateExampleSolutionFx.fail,
|
|
30
|
-
target: this.errorHandlingFx,
|
|
31
|
-
})
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { createEvent, createStore } from 'effector'
|
|
2
|
-
import { ExampleSolutionResponse } from '../types'
|
|
3
|
-
|
|
4
|
-
type AddExampleSolution = {
|
|
5
|
-
cacheKey: string
|
|
6
|
-
response: ExampleSolutionResponse
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export class ExampleSolutionCache {
|
|
10
|
-
public readonly addExampleSolution = createEvent<AddExampleSolution>()
|
|
11
|
-
public readonly $state = createStore<Record<string, ExampleSolutionResponse>>({}).on(
|
|
12
|
-
this.addExampleSolution,
|
|
13
|
-
(state, exampleSolution) => {
|
|
14
|
-
return {
|
|
15
|
-
...state,
|
|
16
|
-
[exampleSolution.cacheKey]: exampleSolution.response,
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
)
|
|
20
|
-
}
|