@magmamath/students-features 0.6.0 → 0.6.1-2.rc-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 +14 -5
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +6 -2
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +27 -24
- 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 +9 -4
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +18 -5
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +10 -3
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +16 -12
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +13 -4
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +14 -8
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +14 -4
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +5 -2
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js +2 -1
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +36 -1
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +8 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.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/ChatBotModel.js +67 -39
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +3 -8
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +12 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +4 -2
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.js +9 -1
- 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/chatbot/types/style.types.js +12 -0
- package/dist/commonjs/features/chatbot/types/style.types.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +2 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js +31 -0
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/assets/grid.png +0 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +97 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js +43 -0
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js +61 -0
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +68 -0
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +75 -0
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/index.js +2 -0
- package/dist/commonjs/features/exampleSolution/components/index.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/constants.js +13 -0
- package/dist/commonjs/features/exampleSolution/constants.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js +54 -0
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/index.js +39 -0
- package/dist/commonjs/features/exampleSolution/index.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +22 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js +24 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js +19 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/types.js +6 -0
- package/dist/commonjs/features/exampleSolution/types.js.map +1 -0
- package/dist/commonjs/features/feedback/model/comments.js +5 -3
- package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
- package/dist/commonjs/features/feedback/model/model.js +7 -9
- package/dist/commonjs/features/feedback/model/model.js.map +1 -1
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js +62 -0
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js.map +1 -0
- 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 +44 -0
- package/dist/commonjs/features/gifCelebrations/components/Backdrop.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js +46 -0
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/components/Gif.js +90 -0
- package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/components/Progress.js +96 -0
- package/dist/commonjs/features/gifCelebrations/components/Progress.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/constants.js +34 -0
- package/dist/commonjs/features/gifCelebrations/constants.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/helpers.js +114 -0
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/index.js +20 -0
- package/dist/commonjs/features/gifCelebrations/index.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js +136 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js +27 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsCache.js +30 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsCache.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/types/model.types.js +6 -0
- package/dist/commonjs/features/gifCelebrations/types/model.types.js.map +1 -0
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js +12 -9
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js.map +1 -1
- package/dist/commonjs/features/problemSelector/constants.js +3 -6
- package/dist/commonjs/features/problemSelector/constants.js.map +1 -1
- package/dist/commonjs/index.js +36 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/effector/ControlledSample.js +40 -0
- package/dist/commonjs/lib/effector/ControlledSample.js.map +1 -0
- package/dist/commonjs/lib/effector/createControllerEffect.js.map +1 -1
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/commonjs/react-app-env.d.js +2 -0
- package/dist/commonjs/react-app-env.d.js.map +1 -0
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js +681 -0
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js +616 -0
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js.map +1 -0
- package/dist/commonjs/shared/icons/index.js +204 -0
- package/dist/commonjs/shared/icons/index.js.map +1 -0
- package/dist/commonjs/shared/translation/constants.js +5 -1
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +33 -0
- package/dist/commonjs/shared/translation/localization/en.json +13 -1
- package/dist/commonjs/shared/translation/localization/gb.json +13 -1
- package/dist/commonjs/shared/translation/localization/sct.json +33 -0
- package/dist/commonjs/shared/translation/localization/sw.json +13 -1
- package/dist/commonjs/shared/translation/types.js +2 -0
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/commonjs/types/common.types.js +2 -0
- package/dist/commonjs/types/common.types.js.map +1 -0
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +6 -2
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +29 -27
- 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 +9 -4
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +18 -5
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +10 -3
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +16 -12
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +13 -4
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +14 -8
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +14 -4
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +5 -2
- 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 +35 -0
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +9 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.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/ChatBotModel.js +68 -40
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +3 -8
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js +12 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +4 -2
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/chatbot/model/constants.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.js +9 -1
- 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/chatbot/types/style.types.js +8 -0
- package/dist/module/features/chatbot/types/style.types.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js +3 -1
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js +25 -0
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +1 -0
- package/dist/module/features/exampleSolution/assets/grid.png +0 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +91 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -0
- package/dist/module/features/exampleSolution/components/LavaIcon.js +35 -0
- package/dist/module/features/exampleSolution/components/LavaIcon.js.map +1 -0
- package/dist/module/features/exampleSolution/components/MessageBlock.js +53 -0
- package/dist/module/features/exampleSolution/components/MessageBlock.js.map +1 -0
- package/dist/module/features/exampleSolution/components/QuestionSection.js +60 -0
- package/dist/module/features/exampleSolution/components/QuestionSection.js.map +1 -0
- package/dist/module/features/exampleSolution/components/SolutionSection.js +67 -0
- package/dist/module/features/exampleSolution/components/SolutionSection.js.map +1 -0
- package/dist/module/features/exampleSolution/components/index.js +2 -0
- package/dist/module/features/exampleSolution/components/index.js.map +1 -0
- package/dist/module/features/exampleSolution/constants.js +9 -0
- package/dist/module/features/exampleSolution/constants.js.map +1 -0
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js +49 -0
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js.map +1 -0
- package/dist/module/features/exampleSolution/index.js +6 -0
- package/dist/module/features/exampleSolution/index.js.map +1 -0
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +17 -0
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +1 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js +19 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js +14 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js.map +1 -0
- package/dist/module/features/exampleSolution/types.js +4 -0
- package/dist/module/features/exampleSolution/types.js.map +1 -0
- package/dist/module/features/feedback/model/comments.js +5 -3
- package/dist/module/features/feedback/model/comments.js.map +1 -1
- package/dist/module/features/feedback/model/model.js +7 -9
- package/dist/module/features/feedback/model/model.js.map +1 -1
- package/dist/module/features/gifCelebrations/GifCelebrations.js +55 -0
- package/dist/module/features/gifCelebrations/GifCelebrations.js.map +1 -0
- 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 +36 -0
- package/dist/module/features/gifCelebrations/components/Backdrop.js.map +1 -0
- package/dist/module/features/gifCelebrations/components/ContentContainer.js +38 -0
- package/dist/module/features/gifCelebrations/components/ContentContainer.js.map +1 -0
- package/dist/module/features/gifCelebrations/components/Gif.js +82 -0
- package/dist/module/features/gifCelebrations/components/Gif.js.map +1 -0
- package/dist/module/features/gifCelebrations/components/Progress.js +88 -0
- package/dist/module/features/gifCelebrations/components/Progress.js.map +1 -0
- package/dist/module/features/gifCelebrations/constants.js +30 -0
- package/dist/module/features/gifCelebrations/constants.js.map +1 -0
- package/dist/module/features/gifCelebrations/helpers.js +103 -0
- package/dist/module/features/gifCelebrations/helpers.js.map +1 -0
- package/dist/module/features/gifCelebrations/index.js +5 -0
- package/dist/module/features/gifCelebrations/index.js.map +1 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js +131 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js.map +1 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js +22 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js.map +1 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrationsCache.js +25 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrationsCache.js.map +1 -0
- package/dist/module/features/gifCelebrations/types/model.types.js +4 -0
- package/dist/module/features/gifCelebrations/types/model.types.js.map +1 -0
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js +13 -10
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js.map +1 -1
- package/dist/module/features/problemSelector/constants.js +2 -5
- package/dist/module/features/problemSelector/constants.js.map +1 -1
- package/dist/module/index.js +3 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/effector/ControlledSample.js +35 -0
- package/dist/module/lib/effector/ControlledSample.js.map +1 -0
- package/dist/module/lib/effector/createControllerEffect.js.map +1 -1
- package/dist/module/react-app-env.d.js +2 -0
- package/dist/module/react-app-env.d.js.map +1 -0
- package/dist/module/shared/icons/ExcitedLavaIcon.js +673 -0
- package/dist/module/shared/icons/ExcitedLavaIcon.js.map +1 -0
- package/dist/module/shared/icons/LavaIconInGlasses.js +608 -0
- package/dist/module/shared/icons/LavaIconInGlasses.js.map +1 -0
- package/dist/module/shared/icons/index.js +21 -0
- package/dist/module/shared/icons/index.js.map +1 -0
- package/dist/module/shared/translation/constants.js +5 -1
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +33 -0
- package/dist/module/shared/translation/localization/en.json +13 -1
- package/dist/module/shared/translation/localization/gb.json +13 -1
- package/dist/module/shared/translation/localization/sct.json +33 -0
- package/dist/module/shared/translation/localization/sw.json +13 -1
- package/dist/module/shared/translation/types.js +2 -0
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/module/types/common.types.js +2 -0
- package/dist/module/types/common.types.js.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
- 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 +2 -1
- 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 +5 -1
- 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 +6 -1
- 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 +7 -2
- 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 +6 -1
- 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 +5 -1
- 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 +3 -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 +4 -3
- 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 +33 -0
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +4 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +1 -0
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +7 -2
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +1 -3
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +5 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/constants.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 +5 -2
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/style.types.d.ts +5 -0
- package/dist/typescript/commonjs/features/chatbot/types/style.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +11 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts +10 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts +10 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/index.d.ts +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts +6 -0
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts +15 -0
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts +4 -0
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts +11 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts +12 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +25 -0
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts +26 -0
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +29 -0
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts +3 -0
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts +25 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts +7 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsCache.d.ts +18 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsCache.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts +45 -0
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts +2 -5
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +3 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/ControlledSample.d.ts +17 -0
- package/dist/typescript/commonjs/lib/effector/ControlledSample.d.ts.map +1 -0
- 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/ExcitedLavaIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/index.d.ts +19 -0
- package/dist/typescript/commonjs/shared/icons/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +24 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +3 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +5 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +5 -0
- package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
- 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 +2 -1
- 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 +5 -1
- 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 +6 -1
- 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 +7 -2
- 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 +6 -1
- 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 +5 -1
- 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 +3 -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 +4 -3
- 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 +33 -0
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +4 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +1 -0
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +7 -2
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +1 -3
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +5 -0
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/constants.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 +5 -2
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/style.types.d.ts +5 -0
- package/dist/typescript/module/features/chatbot/types/style.types.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts +11 -0
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +11 -0
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts +10 -0
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts +10 -0
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/index.d.ts +1 -0
- package/dist/typescript/module/features/exampleSolution/components/index.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/constants.d.ts +6 -0
- package/dist/typescript/module/features/exampleSolution/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts +15 -0
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/index.d.ts +4 -0
- package/dist/typescript/module/features/exampleSolution/index.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts +11 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts +12 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/types.d.ts +25 -0
- package/dist/typescript/module/features/exampleSolution/types.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts +26 -0
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +29 -0
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/index.d.ts +3 -0
- package/dist/typescript/module/features/gifCelebrations/index.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts +25 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts +7 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsCache.d.ts +18 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsCache.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts +45 -0
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts.map +1 -0
- package/dist/typescript/module/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -1
- package/dist/typescript/module/features/problemSelector/constants.d.ts +2 -5
- package/dist/typescript/module/features/problemSelector/constants.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +3 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/ControlledSample.d.ts +17 -0
- package/dist/typescript/module/lib/effector/ControlledSample.d.ts.map +1 -0
- 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/ExcitedLavaIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts +4 -0
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/index.d.ts +19 -0
- package/dist/typescript/module/shared/icons/index.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +24 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +3 -1
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts +5 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts.map +1 -1
- package/dist/typescript/module/types/common.types.d.ts +5 -0
- package/dist/typescript/module/types/common.types.d.ts.map +1 -0
- package/package.json +11 -7
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +6 -0
- package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +28 -29
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +6 -1
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +24 -4
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +39 -6
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +11 -3
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +28 -7
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +25 -5
- package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +24 -13
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +13 -3
- package/src/features/chatbot/components/Chatbot.tsx +6 -2
- package/src/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.tsx +7 -10
- package/src/features/chatbot/constants.ts +37 -0
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +11 -1
- package/src/features/chatbot/index.ts +1 -0
- package/src/features/chatbot/model/ChatBotModel.ts +66 -42
- package/src/features/chatbot/model/ChatBotThreadManager.ts +4 -10
- package/src/features/chatbot/model/ChatBoxTextManager.ts +14 -1
- package/src/features/chatbot/model/DefaultMessageCreator.ts +4 -2
- package/src/features/chatbot/model/constants.ts +0 -2
- package/src/features/chatbot/model/translation.ts +11 -1
- package/src/features/chatbot/types/model.types.ts +5 -2
- package/src/features/chatbot/types/style.types.ts +4 -0
- package/src/features/endOfAssignment/components/Modal/Modal.tsx +3 -0
- package/src/features/exampleSolution/ExampleSolutionModal.tsx +29 -0
- package/src/features/exampleSolution/assets/grid.png +0 -0
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +78 -0
- package/src/features/exampleSolution/components/LavaIcon.tsx +33 -0
- package/src/features/exampleSolution/components/MessageBlock.tsx +67 -0
- package/src/features/exampleSolution/components/QuestionSection.tsx +56 -0
- package/src/features/exampleSolution/components/SolutionSection.tsx +69 -0
- package/src/features/exampleSolution/components/index.ts +0 -0
- package/src/features/exampleSolution/constants.ts +5 -0
- package/src/features/exampleSolution/hooks/useExampleSolution.ts +64 -0
- package/src/features/exampleSolution/index.ts +3 -0
- package/src/features/exampleSolution/model/ExampleSolution.model.ts +12 -0
- package/src/features/exampleSolution/model/ExampleSolutionApi.ts +23 -0
- package/src/features/exampleSolution/model/ExampleSolutionCache.ts +20 -0
- package/src/features/exampleSolution/types.ts +25 -0
- package/src/features/feedback/model/comments.ts +7 -7
- package/src/features/feedback/model/model.ts +6 -6
- package/src/features/gifCelebrations/GifCelebrations.tsx +75 -0
- 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 +41 -0
- package/src/features/gifCelebrations/components/ContentContainer.tsx +44 -0
- package/src/features/gifCelebrations/components/Gif.tsx +88 -0
- package/src/features/gifCelebrations/components/Progress.tsx +106 -0
- package/src/features/gifCelebrations/constants.ts +32 -0
- package/src/features/gifCelebrations/helpers.ts +144 -0
- package/src/features/gifCelebrations/index.ts +2 -0
- package/src/features/gifCelebrations/model/GifCelebrations.model.ts +167 -0
- package/src/features/gifCelebrations/model/GifCelebrationsApi.ts +26 -0
- package/src/features/gifCelebrations/model/GifCelebrationsCache.ts +41 -0
- package/src/features/gifCelebrations/types/model.types.ts +53 -0
- package/src/features/problemSelector/components/ProblemSelectorButton.tsx +17 -10
- package/src/features/problemSelector/constants.ts +3 -2
- package/src/index.ts +3 -0
- package/src/lib/effector/ControlledSample.ts +40 -0
- package/src/lib/effector/createControllerEffect.ts +41 -41
- package/src/lib/helpers/helpers.ts +1 -1
- package/src/react-app-env.d.ts +6 -0
- package/src/shared/icons/ExcitedLavaIcon.tsx +541 -0
- package/src/shared/icons/LavaIconInGlasses.tsx +489 -0
- package/src/shared/icons/index.ts +18 -0
- package/src/shared/translation/constants.ts +4 -0
- package/src/shared/translation/localization/ca.json +33 -0
- package/src/shared/translation/localization/en.json +13 -1
- package/src/shared/translation/localization/gb.json +13 -1
- package/src/shared/translation/localization/sct.json +33 -0
- package/src/shared/translation/localization/sw.json +13 -1
- package/src/shared/translation/types.ts +6 -0
- package/src/shared/translation/validation.types.ts +9 -1
- package/src/types/common.types.ts +4 -0
- package/dist/commonjs/shared/icons/LockIcon.js +0 -31
- package/dist/commonjs/shared/icons/LockIcon.js.map +0 -1
- package/dist/module/shared/icons/LockIcon.js +0 -23
- package/dist/module/shared/icons/LockIcon.js.map +0 -1
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/LockIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/LockIcon.d.ts.map +0 -1
- package/src/shared/icons/LockIcon.tsx +0 -16
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import enTranslations from './localization/en.json';
|
|
2
2
|
import swTranslations from './localization/sw.json';
|
|
3
3
|
import gbTranslations from './localization/gb.json';
|
|
4
|
+
import caTranslations from './localization/ca.json';
|
|
5
|
+
import sctTranslations from './localization/sct.json';
|
|
4
6
|
type Extends<T, U> = T extends U ? true : false;
|
|
5
7
|
type ExtendsAll<Candidate, Types extends unknown[]> = Types extends [infer Head, ...infer Tail] ? Extends<Candidate, Head> extends true ? ExtendsAll<Candidate, Tail> : false : true;
|
|
6
8
|
type FindDominantType<Types extends unknown[]> = Types extends [
|
|
@@ -10,7 +12,9 @@ type FindDominantType<Types extends unknown[]> = Types extends [
|
|
|
10
12
|
type DominantTranslation = FindDominantType<[
|
|
11
13
|
typeof enTranslations,
|
|
12
14
|
typeof swTranslations,
|
|
13
|
-
typeof gbTranslations
|
|
15
|
+
typeof gbTranslations,
|
|
16
|
+
typeof caTranslations,
|
|
17
|
+
typeof sctTranslations
|
|
14
18
|
]>;
|
|
15
19
|
export type ISValidTranslation<T extends DominantTranslation> = T;
|
|
16
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/validation.types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"validation.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/validation.types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,eAAe,MAAM,yBAAyB,CAAA;AAErD,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,GAAG,KAAK,CAAA;AAE/C,KAAK,UAAU,CAAC,SAAS,EAAE,KAAK,SAAS,OAAO,EAAE,IAAI,KAAK,SAAS,CAAC,MAAM,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GAC3F,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,GACnC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,GAC3B,KAAK,GACP,IAAI,CAAA;AAER,KAAK,gBAAgB,CAAC,KAAK,SAAS,OAAO,EAAE,IAAI,KAAK,SAAS;IAC7D,MAAM,KAAK;IACX,GAAG,MAAM,IAAI,SAAS,OAAO,EAAE;CAChC,GACG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,IAAI,GAClC,KAAK,GACL,gBAAgB,CAAC,IAAI,CAAC,GACxB,KAAK,CAAA;AAET,KAAK,mBAAmB,GAAG,gBAAgB,CACzC;IACE,OAAO,cAAc;IACrB,OAAO,cAAc;IACrB,OAAO,cAAc;IACrB,OAAO,cAAc;IACrB,OAAO,eAAe;CACvB,CACF,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,mBAAmB,IAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.12.rc-2",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -17,19 +17,21 @@
|
|
|
17
17
|
"prepare": "bob build",
|
|
18
18
|
"release": "release-it"
|
|
19
19
|
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"effector": "^23.2.3",
|
|
22
|
-
"effector-react": "^23.2.1"
|
|
23
|
-
},
|
|
24
20
|
"peerDependencies": {
|
|
25
21
|
"@magmamath/react-native-ui": "*",
|
|
22
|
+
"effector": "^23.2.3",
|
|
23
|
+
"effector-react": "^23.2.1",
|
|
26
24
|
"react": "*",
|
|
27
25
|
"react-native": "*",
|
|
28
26
|
"react-native-reanimated": ">=0.3.16",
|
|
29
|
-
"react-native-svg": "^15.10.0"
|
|
27
|
+
"react-native-svg": "^15.10.0",
|
|
28
|
+
"react-native-gesture-handler": "*",
|
|
29
|
+
"react-native-modalfy": "*"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@magmamath/react-native-ui": "0.4.
|
|
32
|
+
"@magmamath/react-native-ui": "0.4.22",
|
|
33
|
+
"effector": "^23.2.3",
|
|
34
|
+
"effector-react": "^23.2.1",
|
|
33
35
|
"@react-native/eslint-config": "^0.73.1",
|
|
34
36
|
"@release-it/conventional-changelog": "^9.0.2",
|
|
35
37
|
"@types/jest": "^29.5.5",
|
|
@@ -45,6 +47,8 @@
|
|
|
45
47
|
"react-native-builder-bob": "^0.33.3",
|
|
46
48
|
"react-native-reanimated": "^3.17.2",
|
|
47
49
|
"react-native-svg": "^15.10.0",
|
|
50
|
+
"react-native-gesture-handler": "^2.28.0",
|
|
51
|
+
"react-native-modalfy": "^3.7.0",
|
|
48
52
|
"release-it": "^17.10.0",
|
|
49
53
|
"typescript": "^5.2.2"
|
|
50
54
|
},
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { StyleSheet, View } from 'react-native'
|
|
3
3
|
import { useStoreMap, useUnit } from 'effector-react'
|
|
4
|
+
|
|
4
5
|
import { HelpRequestOption } from './HelpRequestOption'
|
|
5
6
|
import { useChatModel } from '../../context/ChatBotModelContext'
|
|
7
|
+
import { ColorScheme } from '../../types/style.types'
|
|
8
|
+
import { CONTROLS_COLORS_MAP } from '../../constants'
|
|
6
9
|
|
|
7
10
|
type AlternativesProps = {
|
|
8
11
|
onPressAlternative: (message: string, translatedMessage?: string) => void
|
|
9
12
|
hasMessages: boolean
|
|
10
13
|
isHintFeedback: boolean
|
|
14
|
+
colorScheme?: ColorScheme
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
export const Alternatives = ({
|
|
14
18
|
onPressAlternative,
|
|
15
19
|
hasMessages,
|
|
16
20
|
isHintFeedback,
|
|
21
|
+
colorScheme = ColorScheme.Blue,
|
|
17
22
|
}: AlternativesProps) => {
|
|
18
23
|
const model = useChatModel()
|
|
19
24
|
const isTranslated = useUnit(model.translation.$isTranslated)
|
|
@@ -38,6 +43,7 @@ export const Alternatives = ({
|
|
|
38
43
|
onPress={() => onPressAlternative(text, translatedText)}
|
|
39
44
|
message={isTranslated ? (translatedText as string) : text}
|
|
40
45
|
disabled={isTranslationPending}
|
|
46
|
+
hoverColor={CONTROLS_COLORS_MAP[colorScheme].hover}
|
|
41
47
|
/>
|
|
42
48
|
))}
|
|
43
49
|
</View>
|
|
@@ -1,44 +1,40 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
2
|
+
import { Animated, Pressable, StyleSheet } from 'react-native'
|
|
3
|
+
import { COLORS, FONT_FAMILY, SPACING } from '@magmamath/react-native-ui'
|
|
4
4
|
import { ArrowRightIcon } from '../../../../shared/icons/ArrowRightIcon'
|
|
5
5
|
|
|
6
|
-
const transitionColor = (isHovered: boolean, value: Animated.Value) =>
|
|
7
|
-
Animated.timing(value, {
|
|
8
|
-
toValue: isHovered ? 1 : 0,
|
|
9
|
-
duration: 200,
|
|
10
|
-
useNativeDriver: Platform.OS !== 'web',
|
|
11
|
-
}).start()
|
|
12
|
-
|
|
13
6
|
type HelpRequestOptionProps = {
|
|
14
7
|
onPress: () => void
|
|
15
8
|
message: string
|
|
16
9
|
disabled: boolean
|
|
10
|
+
hoverColor?: string
|
|
17
11
|
}
|
|
18
12
|
|
|
19
13
|
export const HelpRequestOption = ({
|
|
20
14
|
onPress,
|
|
21
15
|
message,
|
|
22
16
|
disabled = false,
|
|
17
|
+
hoverColor = COLORS.PRIMARY_BLUE,
|
|
23
18
|
}: HelpRequestOptionProps) => {
|
|
24
19
|
const [isHovered, setIsHovered] = useState(false)
|
|
20
|
+
const hoverAnim = useRef(new Animated.Value(0)).current
|
|
25
21
|
|
|
26
|
-
const backgroundColor =
|
|
27
|
-
const backgroundInterpolation = backgroundColor.interpolate({
|
|
22
|
+
const backgroundColor = hoverAnim.interpolate({
|
|
28
23
|
inputRange: [0, 1],
|
|
29
|
-
outputRange: [
|
|
24
|
+
outputRange: [COLORS.NEUTRAL_1, hoverColor],
|
|
30
25
|
})
|
|
31
|
-
|
|
32
|
-
const textColor = useRef(new Animated.Value(0)).current
|
|
33
|
-
const textInterpolation = textColor.interpolate({
|
|
26
|
+
const textColor = hoverAnim.interpolate({
|
|
34
27
|
inputRange: [0, 1],
|
|
35
|
-
outputRange: [
|
|
28
|
+
outputRange: [COLORS.NEUTRAL_10, COLORS.NEUTRAL_1],
|
|
36
29
|
})
|
|
37
30
|
|
|
38
31
|
useEffect(() => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
Animated.timing(hoverAnim, {
|
|
33
|
+
toValue: isHovered ? 1 : 0,
|
|
34
|
+
duration: 200,
|
|
35
|
+
useNativeDriver: false,
|
|
36
|
+
}).start()
|
|
37
|
+
}, [isHovered, hoverAnim])
|
|
42
38
|
|
|
43
39
|
return (
|
|
44
40
|
<Pressable
|
|
@@ -47,12 +43,16 @@ export const HelpRequestOption = ({
|
|
|
47
43
|
onPress={onPress}
|
|
48
44
|
style={styles.button}
|
|
49
45
|
disabled={disabled}
|
|
46
|
+
accessibilityState={{ disabled }}
|
|
47
|
+
accessibilityRole="button"
|
|
50
48
|
>
|
|
51
|
-
<Animated.View
|
|
52
|
-
|
|
49
|
+
<Animated.View
|
|
50
|
+
style={[styles.textWrapper, { backgroundColor, borderColor: backgroundColor }]}
|
|
51
|
+
>
|
|
52
|
+
<Animated.Text numberOfLines={1} style={[styles.text, { color: textColor }]}>
|
|
53
53
|
{message}
|
|
54
54
|
</Animated.Text>
|
|
55
|
-
<ArrowRightIcon color={isHovered ?
|
|
55
|
+
<ArrowRightIcon color={isHovered ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_10} />
|
|
56
56
|
</Animated.View>
|
|
57
57
|
</Pressable>
|
|
58
58
|
)
|
|
@@ -68,8 +68,8 @@ const styles = StyleSheet.create({
|
|
|
68
68
|
text: {
|
|
69
69
|
fontSize: 20,
|
|
70
70
|
fontWeight: 400,
|
|
71
|
-
fontFamily:
|
|
72
|
-
color:
|
|
71
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
72
|
+
color: COLORS.NEUTRAL_10,
|
|
73
73
|
},
|
|
74
74
|
textWrapper: {
|
|
75
75
|
flex: 1,
|
|
@@ -77,16 +77,15 @@ const styles = StyleSheet.create({
|
|
|
77
77
|
alignItems: 'center',
|
|
78
78
|
justifyContent: 'space-between',
|
|
79
79
|
maxWidth: 305,
|
|
80
|
-
paddingHorizontal:
|
|
81
|
-
paddingVertical:
|
|
80
|
+
paddingHorizontal: SPACING[400],
|
|
81
|
+
paddingVertical: SPACING[200],
|
|
82
82
|
borderWidth: 1,
|
|
83
83
|
borderRadius: 48,
|
|
84
|
-
borderColor: '#55ABE0',
|
|
85
84
|
elevation: 3,
|
|
86
85
|
shadowColor: '#333',
|
|
87
86
|
shadowOffset: { width: 0, height: 1 },
|
|
88
87
|
shadowOpacity: 0.25,
|
|
89
88
|
shadowRadius: 3,
|
|
90
|
-
backgroundColor:
|
|
89
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
91
90
|
},
|
|
92
91
|
})
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import React, { ComponentType } from 'react'
|
|
2
|
+
|
|
2
3
|
import { ReceivedMessage } from './ReceivedMessage'
|
|
3
4
|
import { SentMessage } from './SentMessage'
|
|
4
5
|
import { T2SState } from '../../types/t2s.types'
|
|
5
6
|
import { MessageVariant } from '../../types/model.types'
|
|
6
7
|
import { ConversationMessage } from '../../types/units.types'
|
|
8
|
+
import { ColorScheme } from '../../types/style.types'
|
|
7
9
|
|
|
8
10
|
type ChatMessageProps = {
|
|
9
11
|
variant: MessageVariant
|
|
10
12
|
message: ConversationMessage
|
|
11
|
-
isTranslated?: boolean
|
|
12
13
|
t2sState: T2SState
|
|
14
|
+
isTranslated?: boolean
|
|
15
|
+
withErrorSpotting?: boolean
|
|
16
|
+
withIcon?: boolean
|
|
17
|
+
colorScheme?: ColorScheme
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
export type VariantProps = Omit<ChatMessageProps, 'variant'>
|
|
@@ -1,23 +1,43 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { IS_WEB } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
3
5
|
import { ErrorSpottingButton } from '../../errorSpotting/ErrorSpottingButton'
|
|
4
6
|
import { MessageTextToSpeech } from './MessageTextToSpeech'
|
|
5
7
|
import { ConversationMessage } from '../../types/units.types'
|
|
6
|
-
|
|
8
|
+
|
|
7
9
|
import { T2SState } from '../../types/t2s.types'
|
|
10
|
+
import { ColorScheme } from '../../types/style.types'
|
|
11
|
+
import { MessageVariant } from '../../types/model.types'
|
|
8
12
|
|
|
9
13
|
type MessageButtonsBlockProps = {
|
|
10
14
|
t2sState: T2SState
|
|
11
15
|
message: ConversationMessage
|
|
16
|
+
variant: MessageVariant
|
|
17
|
+
colorScheme?: ColorScheme
|
|
18
|
+
withErrorSpotting?: boolean
|
|
12
19
|
}
|
|
13
20
|
|
|
14
|
-
export const MessageButtonsBlock = ({
|
|
21
|
+
export const MessageButtonsBlock = ({
|
|
22
|
+
t2sState,
|
|
23
|
+
message,
|
|
24
|
+
variant,
|
|
25
|
+
colorScheme,
|
|
26
|
+
withErrorSpotting,
|
|
27
|
+
}: MessageButtonsBlockProps) => {
|
|
15
28
|
if (!t2sState.isEnabled && !message.isInitial) return null
|
|
16
29
|
|
|
17
30
|
return (
|
|
18
31
|
<View style={styles.container}>
|
|
19
|
-
{!!message.isInitial && <ErrorSpottingButton contextMessage={message} />}
|
|
20
|
-
{t2sState.isEnabled &&
|
|
32
|
+
{withErrorSpotting && !!message.isInitial && <ErrorSpottingButton contextMessage={message} />}
|
|
33
|
+
{t2sState.isEnabled && (
|
|
34
|
+
<MessageTextToSpeech
|
|
35
|
+
state={t2sState}
|
|
36
|
+
message={message}
|
|
37
|
+
variant={variant}
|
|
38
|
+
colorScheme={colorScheme}
|
|
39
|
+
/>
|
|
40
|
+
)}
|
|
21
41
|
</View>
|
|
22
42
|
)
|
|
23
43
|
}
|
|
@@ -1,33 +1,66 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Platform, StyleSheet, Text, View } from 'react-native'
|
|
3
|
+
|
|
1
4
|
import { ConversationMessage } from '../../types/units.types'
|
|
2
5
|
import { T2SState } from '../../types/t2s.types'
|
|
3
|
-
import {
|
|
6
|
+
import { ColorScheme } from '../../types/style.types'
|
|
7
|
+
|
|
4
8
|
import { MessageButtonsBlock } from './MessageButtonsBlock'
|
|
5
9
|
import { getSpacerSize } from './helpers'
|
|
6
|
-
import
|
|
10
|
+
import { MessageVariant } from '../../types/model.types'
|
|
7
11
|
|
|
8
12
|
type MessageContentProps = {
|
|
9
13
|
text: string
|
|
10
14
|
message: ConversationMessage
|
|
11
15
|
t2sState: T2SState
|
|
16
|
+
variant: MessageVariant
|
|
17
|
+
colorScheme?: ColorScheme
|
|
18
|
+
withErrorSpotting?: boolean
|
|
12
19
|
}
|
|
13
20
|
|
|
14
|
-
const MessageContentWeb = ({
|
|
21
|
+
const MessageContentWeb = ({
|
|
22
|
+
message,
|
|
23
|
+
text,
|
|
24
|
+
t2sState,
|
|
25
|
+
variant,
|
|
26
|
+
colorScheme = ColorScheme.Blue,
|
|
27
|
+
withErrorSpotting,
|
|
28
|
+
}: MessageContentProps) => {
|
|
15
29
|
return (
|
|
16
30
|
<Text style={styles.messageText}>
|
|
17
31
|
{text}
|
|
18
|
-
<MessageButtonsBlock
|
|
32
|
+
<MessageButtonsBlock
|
|
33
|
+
message={message}
|
|
34
|
+
t2sState={t2sState}
|
|
35
|
+
variant={variant}
|
|
36
|
+
colorScheme={colorScheme}
|
|
37
|
+
withErrorSpotting={withErrorSpotting}
|
|
38
|
+
/>
|
|
19
39
|
</Text>
|
|
20
40
|
)
|
|
21
41
|
}
|
|
22
42
|
|
|
23
|
-
const MessageContentMobile = ({
|
|
43
|
+
const MessageContentMobile = ({
|
|
44
|
+
message,
|
|
45
|
+
text,
|
|
46
|
+
t2sState,
|
|
47
|
+
variant,
|
|
48
|
+
colorScheme = ColorScheme.Blue,
|
|
49
|
+
withErrorSpotting,
|
|
50
|
+
}: MessageContentProps) => {
|
|
24
51
|
return (
|
|
25
52
|
<>
|
|
26
53
|
<Text style={[styles.messageText, styles.mobileMessageText]}>
|
|
27
54
|
{text}
|
|
28
55
|
<View style={{ width: getSpacerSize(message, t2sState) }} />
|
|
29
56
|
</Text>
|
|
30
|
-
<MessageButtonsBlock
|
|
57
|
+
<MessageButtonsBlock
|
|
58
|
+
message={message}
|
|
59
|
+
t2sState={t2sState}
|
|
60
|
+
variant={variant}
|
|
61
|
+
colorScheme={colorScheme}
|
|
62
|
+
withErrorSpotting={withErrorSpotting}
|
|
63
|
+
/>
|
|
31
64
|
</>
|
|
32
65
|
)
|
|
33
66
|
}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
3
5
|
import { ChatbotIcon } from '../../../../shared/icons/ChatbotIcon'
|
|
4
6
|
import { ThreeDotsLoader } from '../ThreeDotsLoader/ThreeDotsLoader'
|
|
7
|
+
import { CONTROLS_COLORS_MAP } from '../../constants'
|
|
8
|
+
import { ColorScheme } from '../../types/style.types'
|
|
9
|
+
|
|
10
|
+
type MessageLoaderProps = {
|
|
11
|
+
colorScheme?: ColorScheme
|
|
12
|
+
}
|
|
5
13
|
|
|
6
|
-
export const MessageLoader = () => (
|
|
14
|
+
export const MessageLoader = ({ colorScheme = ColorScheme.Blue }: MessageLoaderProps) => (
|
|
7
15
|
<View style={styles.container}>
|
|
8
16
|
<View style={styles.icon}>
|
|
9
17
|
<ChatbotIcon width={60} height={80} />
|
|
10
18
|
</View>
|
|
11
19
|
<View style={styles.loader}>
|
|
12
|
-
<ThreeDotsLoader />
|
|
20
|
+
<ThreeDotsLoader backgroundColor={CONTROLS_COLORS_MAP[colorScheme].background} />
|
|
13
21
|
</View>
|
|
14
22
|
</View>
|
|
15
23
|
)
|
|
@@ -38,6 +46,6 @@ const styles = StyleSheet.create({
|
|
|
38
46
|
elevation: 3,
|
|
39
47
|
borderRadius: 8,
|
|
40
48
|
borderBottomLeftRadius: 0,
|
|
41
|
-
backgroundColor:
|
|
49
|
+
backgroundColor: COLORS.NEUTRAL_3,
|
|
42
50
|
},
|
|
43
51
|
})
|
|
@@ -1,41 +1,55 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { ActivityIndicator } from 'react-native'
|
|
3
|
+
import { Button, COLORS } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
3
5
|
import { SpeakerIcon } from '../../../../shared/icons/SpeakerIcon'
|
|
4
6
|
import { PlayIcon } from '../../../../shared/icons/PlayIcon'
|
|
5
7
|
import { PauseIcon } from '../../../../shared/icons/PauseIcon'
|
|
6
8
|
import { AudioStatus, T2SState } from '../../types/t2s.types'
|
|
7
9
|
import { useChatModel } from '../../context/ChatBotModelContext'
|
|
8
10
|
import { ConversationMessage } from '../../types/units.types'
|
|
9
|
-
import {
|
|
11
|
+
import { ColorScheme } from '../../types/style.types'
|
|
12
|
+
import { MessageVariant } from '../../types/model.types'
|
|
13
|
+
import { CONTROLS_COLORS_MAP, MESSAGE_COLORS_MAP } from '../../constants'
|
|
10
14
|
|
|
11
15
|
type TextToSpeechIconProps = {
|
|
12
16
|
status: AudioStatus
|
|
13
17
|
isLoading: boolean
|
|
14
18
|
isActive: boolean
|
|
19
|
+
colorScheme?: ColorScheme
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
const TextToSpeechIcon = ({
|
|
22
|
+
const TextToSpeechIcon = ({
|
|
23
|
+
status,
|
|
24
|
+
isActive,
|
|
25
|
+
isLoading,
|
|
26
|
+
colorScheme = ColorScheme.Blue,
|
|
27
|
+
}: TextToSpeechIconProps) => {
|
|
18
28
|
if (isLoading && isActive) {
|
|
19
|
-
return <ActivityIndicator />
|
|
29
|
+
return <ActivityIndicator color={CONTROLS_COLORS_MAP[colorScheme].background} />
|
|
20
30
|
}
|
|
21
31
|
|
|
22
32
|
if (!isActive) {
|
|
23
|
-
return <SpeakerIcon
|
|
33
|
+
return <SpeakerIcon />
|
|
24
34
|
}
|
|
25
35
|
|
|
26
36
|
if (status === 'playing') return <PauseIcon color={COLORS.NEUTRAL_1} />
|
|
27
37
|
if (status === 'paused') return <PlayIcon color={COLORS.NEUTRAL_1} />
|
|
28
|
-
return <SpeakerIcon
|
|
38
|
+
return <SpeakerIcon />
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
type MessageTextToSpeechProps = {
|
|
32
42
|
state: T2SState
|
|
33
43
|
message: ConversationMessage
|
|
44
|
+
variant: MessageVariant
|
|
45
|
+
colorScheme?: ColorScheme
|
|
34
46
|
}
|
|
35
47
|
|
|
36
48
|
export const MessageTextToSpeech = ({
|
|
37
49
|
state: { status, disabled, isActive, isLoading },
|
|
38
50
|
message,
|
|
51
|
+
variant,
|
|
52
|
+
colorScheme = ColorScheme.Blue,
|
|
39
53
|
}: MessageTextToSpeechProps) => {
|
|
40
54
|
const model = useChatModel()
|
|
41
55
|
|
|
@@ -51,10 +65,17 @@ export const MessageTextToSpeech = ({
|
|
|
51
65
|
disabled={disabled}
|
|
52
66
|
isActive={isActive}
|
|
53
67
|
variant={'secondary'}
|
|
54
|
-
colorScheme={
|
|
68
|
+
colorScheme={MESSAGE_COLORS_MAP[colorScheme][variant].icon}
|
|
55
69
|
size={'small'}
|
|
56
70
|
onPress={play}
|
|
57
|
-
icon={
|
|
71
|
+
icon={
|
|
72
|
+
<TextToSpeechIcon
|
|
73
|
+
isActive={isActive}
|
|
74
|
+
isLoading={isLoading}
|
|
75
|
+
status={status}
|
|
76
|
+
colorScheme={colorScheme}
|
|
77
|
+
/>
|
|
78
|
+
}
|
|
58
79
|
/>
|
|
59
80
|
)
|
|
60
81
|
}
|
|
@@ -1,20 +1,39 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
|
|
3
4
|
import { VariantProps } from './ChatMessage'
|
|
4
5
|
import { ChatbotIcon } from '../../../../shared/icons/ChatbotIcon'
|
|
6
|
+
import { ColorScheme } from '../../types/style.types'
|
|
5
7
|
import { MessageContent } from './MessageContent'
|
|
8
|
+
import { MessageVariant } from '../../types/model.types'
|
|
6
9
|
|
|
7
|
-
export const ReceivedMessage = ({
|
|
10
|
+
export const ReceivedMessage = ({
|
|
11
|
+
message,
|
|
12
|
+
isTranslated,
|
|
13
|
+
t2sState,
|
|
14
|
+
withIcon,
|
|
15
|
+
colorScheme = ColorScheme.Blue,
|
|
16
|
+
withErrorSpotting,
|
|
17
|
+
}: VariantProps) => {
|
|
8
18
|
const text = isTranslated ? message.translatedMessage : message.message
|
|
9
19
|
|
|
10
20
|
return (
|
|
11
21
|
<View style={styles.container}>
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
22
|
+
{withIcon && (
|
|
23
|
+
<View style={styles.icon}>
|
|
24
|
+
<ChatbotIcon width={60} height={80} />
|
|
25
|
+
</View>
|
|
26
|
+
)}
|
|
15
27
|
|
|
16
28
|
<View style={styles.message}>
|
|
17
|
-
<MessageContent
|
|
29
|
+
<MessageContent
|
|
30
|
+
message={message}
|
|
31
|
+
variant={MessageVariant.RECEIVED}
|
|
32
|
+
t2sState={t2sState}
|
|
33
|
+
text={text ?? ''}
|
|
34
|
+
colorScheme={colorScheme}
|
|
35
|
+
withErrorSpotting={withErrorSpotting}
|
|
36
|
+
/>
|
|
18
37
|
</View>
|
|
19
38
|
</View>
|
|
20
39
|
)
|
|
@@ -27,6 +46,7 @@ const styles = StyleSheet.create({
|
|
|
27
46
|
maxWidth: 372,
|
|
28
47
|
width: 372,
|
|
29
48
|
alignItems: 'flex-end',
|
|
49
|
+
justifyContent: 'flex-end',
|
|
30
50
|
},
|
|
31
51
|
icon: {
|
|
32
52
|
alignSelf: 'flex-end',
|
|
@@ -1,30 +1,41 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, FONT_FAMILY, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
3
5
|
import { VariantProps } from './ChatMessage'
|
|
6
|
+
import { MESSAGE_COLORS_MAP } from '../../constants'
|
|
7
|
+
import { ColorScheme } from '../../types/style.types'
|
|
8
|
+
import { MessageVariant } from '../../types/model.types'
|
|
4
9
|
|
|
5
|
-
export const SentMessage = React.memo(
|
|
6
|
-
|
|
10
|
+
export const SentMessage = React.memo(
|
|
11
|
+
({ message, isTranslated, colorScheme = ColorScheme.Blue }: VariantProps) => {
|
|
12
|
+
const text = isTranslated ? message.translatedMessage : message.message
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
+
return (
|
|
15
|
+
<View
|
|
16
|
+
style={[
|
|
17
|
+
styles.container,
|
|
18
|
+
{ backgroundColor: MESSAGE_COLORS_MAP[colorScheme][MessageVariant.SENT].background },
|
|
19
|
+
]}
|
|
20
|
+
>
|
|
21
|
+
<Text style={styles.text}>{text}</Text>
|
|
22
|
+
</View>
|
|
23
|
+
)
|
|
24
|
+
},
|
|
25
|
+
)
|
|
14
26
|
|
|
15
27
|
const styles = StyleSheet.create({
|
|
16
28
|
container: {
|
|
17
29
|
alignSelf: 'flex-end',
|
|
18
30
|
maxWidth: 305,
|
|
19
|
-
padding:
|
|
20
|
-
borderRadius:
|
|
31
|
+
padding: SPACING[200],
|
|
32
|
+
borderRadius: BORDER_RADIUS[200],
|
|
21
33
|
borderBottomRightRadius: 0,
|
|
22
|
-
backgroundColor: '#55ABE0',
|
|
23
34
|
},
|
|
24
35
|
text: {
|
|
25
36
|
fontSize: 20,
|
|
26
37
|
fontWeight: 400,
|
|
27
|
-
fontFamily:
|
|
28
|
-
color:
|
|
38
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
39
|
+
color: COLORS.NEUTRAL_1,
|
|
29
40
|
},
|
|
30
41
|
})
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import React, { useRef } from 'react'
|
|
2
2
|
import { Platform, ScrollView, StyleSheet, useWindowDimensions, View } from 'react-native'
|
|
3
3
|
import { useStoreMap, useUnit } from 'effector-react'
|
|
4
|
+
|
|
4
5
|
import { ChatbotModel } from '../../model/ChatBotModel'
|
|
5
6
|
import { ChatMessage } from '../ChatMessage/ChatMessage'
|
|
6
7
|
import { MessageLoader } from '../ChatMessage/MessageLoader'
|
|
7
8
|
import { Alternatives } from '../Alternatives/Alternatives'
|
|
8
9
|
import { MessageVariant } from '../../types/model.types'
|
|
10
|
+
import { ColorScheme } from '../../types/style.types'
|
|
9
11
|
|
|
10
12
|
type ChatbotMessagesProps = {
|
|
11
13
|
model: ChatbotModel
|
|
12
14
|
isHintFeedback: boolean
|
|
13
15
|
isTextToSpeechEnabled: boolean
|
|
16
|
+
colorScheme?: ColorScheme
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
const TOOLBAR_HEIGHT = 140
|
|
@@ -23,6 +26,7 @@ export const ChatbotMessages = ({
|
|
|
23
26
|
model,
|
|
24
27
|
isHintFeedback,
|
|
25
28
|
isTextToSpeechEnabled,
|
|
29
|
+
colorScheme = ColorScheme.Blue,
|
|
26
30
|
}: ChatbotMessagesProps) => {
|
|
27
31
|
const dimensions = useWindowDimensions()
|
|
28
32
|
const ref = useRef<ScrollView>(null)
|
|
@@ -34,10 +38,12 @@ export const ChatbotMessages = ({
|
|
|
34
38
|
const currentPlayingId = useUnit(model.t2s.$currentPlayingId)
|
|
35
39
|
const isTranslated = useUnit(model.translation.$isTranslated)
|
|
36
40
|
const audioStatus = useUnit(model.t2s.$status)
|
|
37
|
-
|
|
38
|
-
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET
|
|
41
|
+
const errorSpottingEnabled = useUnit(model.errorSpotting.$isEnabled)
|
|
39
42
|
|
|
40
43
|
const messages = useStoreMap(model.$currentChatData, ({ messages }) => messages)
|
|
44
|
+
const lastMessageId = messages.at(-1)?.id
|
|
45
|
+
|
|
46
|
+
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET
|
|
41
47
|
|
|
42
48
|
const askChatForHelp = (message: string, translatedMessage?: string) => {
|
|
43
49
|
void model.sendHelpRequestFx({ message, translatedMessage })
|
|
@@ -63,8 +69,11 @@ export const ChatbotMessages = ({
|
|
|
63
69
|
<ChatMessage
|
|
64
70
|
key={message.id}
|
|
65
71
|
isTranslated={isTranslated}
|
|
72
|
+
withIcon={!message.isOwnMessage && message.id === lastMessageId}
|
|
66
73
|
message={message}
|
|
67
74
|
variant={message.isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED}
|
|
75
|
+
colorScheme={colorScheme}
|
|
76
|
+
withErrorSpotting={errorSpottingEnabled && !message.isOwnMessage}
|
|
68
77
|
t2sState={{
|
|
69
78
|
isEnabled: isTextToSpeechEnabled && !message.isOwnMessage,
|
|
70
79
|
isActive: message.id === currentPlayingId,
|
|
@@ -75,7 +84,7 @@ export const ChatbotMessages = ({
|
|
|
75
84
|
/>
|
|
76
85
|
))}
|
|
77
86
|
|
|
78
|
-
{isHelpRequestPending && <MessageLoader />}
|
|
87
|
+
{isHelpRequestPending && <MessageLoader colorScheme={colorScheme} />}
|
|
79
88
|
</View>
|
|
80
89
|
)}
|
|
81
90
|
|
|
@@ -84,6 +93,7 @@ export const ChatbotMessages = ({
|
|
|
84
93
|
onPressAlternative={askChatForHelp}
|
|
85
94
|
hasMessages={messages.length > 1}
|
|
86
95
|
isHintFeedback={isHintFeedback}
|
|
96
|
+
colorScheme={colorScheme}
|
|
87
97
|
/>
|
|
88
98
|
)}
|
|
89
99
|
</ScrollView>
|