@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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ReceivedMessage","SentMessage","MessageVariant","jsx","_jsx","variantsMap","SENT","RECEIVED","ChatMessage","variant","props","Component"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAyB,OAAO;
|
|
1
|
+
{"version":3,"names":["React","ReceivedMessage","SentMessage","MessageVariant","jsx","_jsx","variantsMap","SENT","RECEIVED","ChatMessage","variant","props","Component"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAE5C,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,WAAW,QAAQ,kBAAe;AAE3C,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAgBxD,MAAMC,WAAgE,GAAG;EACvE,CAACH,cAAc,CAACI,IAAI,GAAGL,WAAW;EAClC,CAACC,cAAc,CAACK,QAAQ,GAAGP;AAC7B,CAAC;AAED,OAAO,MAAMQ,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAE,GAAGC;AAAwB,CAAC,KAAK;EACtE,MAAMC,SAAS,GAAGN,WAAW,CAACI,OAAO,CAAC;EACtC,oBAAOL,IAAA,CAACO,SAAS;IAAA,GAAKD;EAAK,CAAG,CAAC;AACjC,CAAC","ignoreList":[]}
|
|
@@ -2,22 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { IS_WEB } from '@magmamath/react-native-ui';
|
|
5
6
|
import { ErrorSpottingButton } from "../../errorSpotting/ErrorSpottingButton.js";
|
|
6
7
|
import { MessageTextToSpeech } from "./MessageTextToSpeech.js";
|
|
7
|
-
import { IS_WEB } from '@magmamath/react-native-ui';
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
export const MessageButtonsBlock = ({
|
|
10
10
|
t2sState,
|
|
11
|
-
message
|
|
11
|
+
message,
|
|
12
|
+
variant,
|
|
13
|
+
colorScheme,
|
|
14
|
+
withErrorSpotting
|
|
12
15
|
}) => {
|
|
13
16
|
if (!t2sState.isEnabled && !message.isInitial) return null;
|
|
14
17
|
return /*#__PURE__*/_jsxs(View, {
|
|
15
18
|
style: styles.container,
|
|
16
|
-
children: [!!message.isInitial && /*#__PURE__*/_jsx(ErrorSpottingButton, {
|
|
19
|
+
children: [withErrorSpotting && !!message.isInitial && /*#__PURE__*/_jsx(ErrorSpottingButton, {
|
|
17
20
|
contextMessage: message
|
|
18
21
|
}), t2sState.isEnabled && /*#__PURE__*/_jsx(MessageTextToSpeech, {
|
|
19
22
|
state: t2sState,
|
|
20
|
-
message: message
|
|
23
|
+
message: message,
|
|
24
|
+
variant: variant,
|
|
25
|
+
colorScheme: colorScheme
|
|
21
26
|
})]
|
|
22
27
|
});
|
|
23
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","IS_WEB","ErrorSpottingButton","MessageTextToSpeech","jsx","_jsx","jsxs","_jsxs","MessageButtonsBlock","t2sState","message","variant","colorScheme","withErrorSpotting","isEnabled","isInitial","style","styles","container","children","contextMessage","state","create","flexDirection","gap","marginLeft","float","position","bottom","right"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,4BAA4B;AAEnD,SAASC,mBAAmB,QAAQ,4CAAyC;AAC7E,SAASC,mBAAmB,QAAQ,0BAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAe3D,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,QAAQ;EACRC,OAAO;EACPC,OAAO;EACPC,WAAW;EACXC;AACwB,CAAC,KAAK;EAC9B,IAAI,CAACJ,QAAQ,CAACK,SAAS,IAAI,CAACJ,OAAO,CAACK,SAAS,EAAE,OAAO,IAAI;EAE1D,oBACER,KAAA,CAACP,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,GAC3BN,iBAAiB,IAAI,CAAC,CAACH,OAAO,CAACK,SAAS,iBAAIV,IAAA,CAACH,mBAAmB;MAACkB,cAAc,EAAEV;IAAQ,CAAE,CAAC,EAC5FD,QAAQ,CAACK,SAAS,iBACjBT,IAAA,CAACF,mBAAmB;MAClBkB,KAAK,EAAEZ,QAAS;MAChBC,OAAO,EAAEA,OAAQ;MACjBC,OAAO,EAAEA,OAAQ;MACjBC,WAAW,EAAEA;IAAY,CAC1B,CACF;EAAA,CACG,CAAC;AAEX,CAAC;AAED,MAAMK,MAAM,GAAGlB,UAAU,CAACuB,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAE,CAAC;IACNC,UAAU,EAAE,MAAM;IAClB,IAAIxB,MAAM,GACN;MAAEyB,KAAK,EAAE;IAAQ,CAAC,GAClB;MACEC,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,CAAC;MACTC,KAAK,EAAE;IACT,CAAC;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import { Platform, StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { ColorScheme } from "../../types/style.types.js";
|
|
4
6
|
import { MessageButtonsBlock } from "./MessageButtonsBlock.js";
|
|
5
7
|
import { getSpacerSize } from "./helpers.js";
|
|
6
|
-
import React from 'react';
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
9
|
const MessageContentWeb = ({
|
|
9
10
|
message,
|
|
10
11
|
text,
|
|
11
|
-
t2sState
|
|
12
|
+
t2sState,
|
|
13
|
+
variant,
|
|
14
|
+
colorScheme = ColorScheme.Blue,
|
|
15
|
+
withErrorSpotting
|
|
12
16
|
}) => {
|
|
13
17
|
return /*#__PURE__*/_jsxs(Text, {
|
|
14
18
|
style: styles.messageText,
|
|
15
19
|
children: [text, /*#__PURE__*/_jsx(MessageButtonsBlock, {
|
|
16
20
|
message: message,
|
|
17
|
-
t2sState: t2sState
|
|
21
|
+
t2sState: t2sState,
|
|
22
|
+
variant: variant,
|
|
23
|
+
colorScheme: colorScheme,
|
|
24
|
+
withErrorSpotting: withErrorSpotting
|
|
18
25
|
})]
|
|
19
26
|
});
|
|
20
27
|
};
|
|
21
28
|
const MessageContentMobile = ({
|
|
22
29
|
message,
|
|
23
30
|
text,
|
|
24
|
-
t2sState
|
|
31
|
+
t2sState,
|
|
32
|
+
variant,
|
|
33
|
+
colorScheme = ColorScheme.Blue,
|
|
34
|
+
withErrorSpotting
|
|
25
35
|
}) => {
|
|
26
36
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
27
37
|
children: [/*#__PURE__*/_jsxs(Text, {
|
|
@@ -33,7 +43,10 @@ const MessageContentMobile = ({
|
|
|
33
43
|
})]
|
|
34
44
|
}), /*#__PURE__*/_jsx(MessageButtonsBlock, {
|
|
35
45
|
message: message,
|
|
36
|
-
t2sState: t2sState
|
|
46
|
+
t2sState: t2sState,
|
|
47
|
+
variant: variant,
|
|
48
|
+
colorScheme: colorScheme,
|
|
49
|
+
withErrorSpotting: withErrorSpotting
|
|
37
50
|
})]
|
|
38
51
|
});
|
|
39
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","StyleSheet","Text","View","
|
|
1
|
+
{"version":3,"names":["React","Platform","StyleSheet","Text","View","ColorScheme","MessageButtonsBlock","getSpacerSize","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","MessageContentWeb","message","text","t2sState","variant","colorScheme","Blue","withErrorSpotting","style","styles","messageText","children","MessageContentMobile","mobileMessageText","width","MessageContent","select","web","default","create","flex","fontSize","fontWeight","fontFamily","color","lineHeight"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageContent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAI/D,SAASC,WAAW,QAAQ,4BAAyB;AAErD,SAASC,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,aAAa,QAAQ,cAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAYzC,MAAMC,iBAAiB,GAAGA,CAAC;EACzBC,OAAO;EACPC,IAAI;EACJC,QAAQ;EACRC,OAAO;EACPC,WAAW,GAAGd,WAAW,CAACe,IAAI;EAC9BC;AACmB,CAAC,KAAK;EACzB,oBACEV,KAAA,CAACR,IAAI;IAACmB,KAAK,EAAEC,MAAM,CAACC,WAAY;IAAAC,QAAA,GAC7BT,IAA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CAAC;EACDD,iBAAiB,EAAE;IACjBY,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { COLORS } from '@magmamath/react-native-ui';
|
|
5
6
|
import { ChatbotIcon } from "../../../../shared/icons/ChatbotIcon.js";
|
|
6
7
|
import { ThreeDotsLoader } from "../ThreeDotsLoader/ThreeDotsLoader.js";
|
|
8
|
+
import { CONTROLS_COLORS_MAP } from "../../constants.js";
|
|
9
|
+
import { ColorScheme } from "../../types/style.types.js";
|
|
7
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
export const MessageLoader = (
|
|
11
|
+
export const MessageLoader = ({
|
|
12
|
+
colorScheme = ColorScheme.Blue
|
|
13
|
+
}) => /*#__PURE__*/_jsxs(View, {
|
|
9
14
|
style: styles.container,
|
|
10
15
|
children: [/*#__PURE__*/_jsx(View, {
|
|
11
16
|
style: styles.icon,
|
|
@@ -15,7 +20,9 @@ export const MessageLoader = () => /*#__PURE__*/_jsxs(View, {
|
|
|
15
20
|
})
|
|
16
21
|
}), /*#__PURE__*/_jsx(View, {
|
|
17
22
|
style: styles.loader,
|
|
18
|
-
children: /*#__PURE__*/_jsx(ThreeDotsLoader, {
|
|
23
|
+
children: /*#__PURE__*/_jsx(ThreeDotsLoader, {
|
|
24
|
+
backgroundColor: CONTROLS_COLORS_MAP[colorScheme].background
|
|
25
|
+
})
|
|
19
26
|
})]
|
|
20
27
|
});
|
|
21
28
|
const styles = StyleSheet.create({
|
|
@@ -45,7 +52,7 @@ const styles = StyleSheet.create({
|
|
|
45
52
|
elevation: 3,
|
|
46
53
|
borderRadius: 8,
|
|
47
54
|
borderBottomLeftRadius: 0,
|
|
48
|
-
backgroundColor:
|
|
55
|
+
backgroundColor: COLORS.NEUTRAL_3
|
|
49
56
|
}
|
|
50
57
|
});
|
|
51
58
|
//# sourceMappingURL=MessageLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","ChatbotIcon","ThreeDotsLoader","jsx","_jsx","jsxs","_jsxs","MessageLoader","style","styles","container","children","icon","width","height","loader","create","flexDirection","alignItems","alignSelf","marginRight","flex","maxWidth","padding","paddingTop","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","COLORS","ChatbotIcon","ThreeDotsLoader","CONTROLS_COLORS_MAP","ColorScheme","jsx","_jsx","jsxs","_jsxs","MessageLoader","colorScheme","Blue","style","styles","container","children","icon","width","height","loader","backgroundColor","background","create","flexDirection","alignItems","alignSelf","marginRight","flex","maxWidth","padding","paddingTop","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","NEUTRAL_3"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageLoader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,4BAA4B;AAEnD,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC,eAAe,QAAQ,uCAAoC;AACpE,SAASC,mBAAmB,QAAQ,oBAAiB;AACrD,SAASC,WAAW,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMrD,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAAEC,WAAW,GAAGN,WAAW,CAACO;AAAyB,CAAC,kBAClFH,KAAA,CAACT,IAAI;EAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAAC,QAAA,gBAC5BT,IAAA,CAACP,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACG,IAAK;IAAAD,QAAA,eACvBT,IAAA,CAACL,WAAW;MAACgB,KAAK,EAAE,EAAG;MAACC,MAAM,EAAE;IAAG,CAAE;EAAC,CAClC,CAAC,eACPZ,IAAA,CAACP,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACM,MAAO;IAAAJ,QAAA,eACzBT,IAAA,CAACJ,eAAe;MAACkB,eAAe,EAAEjB,mBAAmB,CAACO,WAAW,CAAC,CAACW;IAAW,CAAE;EAAC,CAC7E,CAAC;AAAA,CACH,CACP;AAED,MAAMR,MAAM,GAAGf,UAAU,CAACwB,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,aAAa,EAAE,KAAK;IACpBN,KAAK,EAAE,GAAG;IACVO,UAAU,EAAE;EACd,CAAC;EACDR,IAAI,EAAE;IACJS,SAAS,EAAE,UAAU;IACrBC,WAAW,EAAE;EACf,CAAC;EACDP,MAAM,EAAE;IACNQ,IAAI,EAAE,CAAC;IACPJ,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,YAAY;IACxBI,QAAQ,EAAE,EAAE;IACZC,OAAO,EAAE,CAAC;IACVC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;MAAEf,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCe,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,sBAAsB,EAAE,CAAC;IACzBjB,eAAe,EAAEpB,MAAM,CAACsC;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,24 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { ActivityIndicator } from 'react-native';
|
|
5
|
+
import { Button, COLORS } from '@magmamath/react-native-ui';
|
|
5
6
|
import { SpeakerIcon } from "../../../../shared/icons/SpeakerIcon.js";
|
|
6
7
|
import { PlayIcon } from "../../../../shared/icons/PlayIcon.js";
|
|
7
8
|
import { PauseIcon } from "../../../../shared/icons/PauseIcon.js";
|
|
8
9
|
import { useChatModel } from "../../context/ChatBotModelContext.js";
|
|
9
|
-
import {
|
|
10
|
+
import { ColorScheme } from "../../types/style.types.js";
|
|
11
|
+
import { CONTROLS_COLORS_MAP, MESSAGE_COLORS_MAP } from "../../constants.js";
|
|
10
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
13
|
const TextToSpeechIcon = ({
|
|
12
14
|
status,
|
|
13
15
|
isActive,
|
|
14
|
-
isLoading
|
|
16
|
+
isLoading,
|
|
17
|
+
colorScheme = ColorScheme.Blue
|
|
15
18
|
}) => {
|
|
16
19
|
if (isLoading && isActive) {
|
|
17
|
-
return /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
20
|
+
return /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
21
|
+
color: CONTROLS_COLORS_MAP[colorScheme].background
|
|
22
|
+
});
|
|
18
23
|
}
|
|
19
24
|
if (!isActive) {
|
|
20
|
-
return /*#__PURE__*/_jsx(SpeakerIcon, {
|
|
21
|
-
color: isActive ? COLORS.PRIMARY_BLUE : undefined
|
|
22
|
-
});
|
|
25
|
+
return /*#__PURE__*/_jsx(SpeakerIcon, {});
|
|
23
26
|
}
|
|
24
27
|
if (status === 'playing') return /*#__PURE__*/_jsx(PauseIcon, {
|
|
25
28
|
color: COLORS.NEUTRAL_1
|
|
@@ -27,9 +30,7 @@ const TextToSpeechIcon = ({
|
|
|
27
30
|
if (status === 'paused') return /*#__PURE__*/_jsx(PlayIcon, {
|
|
28
31
|
color: COLORS.NEUTRAL_1
|
|
29
32
|
});
|
|
30
|
-
return /*#__PURE__*/_jsx(SpeakerIcon, {
|
|
31
|
-
color: isActive ? COLORS.PRIMARY_BLUE : undefined
|
|
32
|
-
});
|
|
33
|
+
return /*#__PURE__*/_jsx(SpeakerIcon, {});
|
|
33
34
|
};
|
|
34
35
|
export const MessageTextToSpeech = ({
|
|
35
36
|
state: {
|
|
@@ -38,7 +39,9 @@ export const MessageTextToSpeech = ({
|
|
|
38
39
|
isActive,
|
|
39
40
|
isLoading
|
|
40
41
|
},
|
|
41
|
-
message
|
|
42
|
+
message,
|
|
43
|
+
variant,
|
|
44
|
+
colorScheme = ColorScheme.Blue
|
|
42
45
|
}) => {
|
|
43
46
|
const model = useChatModel();
|
|
44
47
|
function play() {
|
|
@@ -51,13 +54,14 @@ export const MessageTextToSpeech = ({
|
|
|
51
54
|
disabled: disabled,
|
|
52
55
|
isActive: isActive,
|
|
53
56
|
variant: 'secondary',
|
|
54
|
-
colorScheme:
|
|
57
|
+
colorScheme: MESSAGE_COLORS_MAP[colorScheme][variant].icon,
|
|
55
58
|
size: 'small',
|
|
56
59
|
onPress: play,
|
|
57
60
|
icon: /*#__PURE__*/_jsx(TextToSpeechIcon, {
|
|
58
61
|
isActive: isActive,
|
|
59
62
|
isLoading: isLoading,
|
|
60
|
-
status: status
|
|
63
|
+
status: status,
|
|
64
|
+
colorScheme: colorScheme
|
|
61
65
|
})
|
|
62
66
|
});
|
|
63
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ActivityIndicator","SpeakerIcon","PlayIcon","PauseIcon","useChatModel","
|
|
1
|
+
{"version":3,"names":["React","ActivityIndicator","Button","COLORS","SpeakerIcon","PlayIcon","PauseIcon","useChatModel","ColorScheme","CONTROLS_COLORS_MAP","MESSAGE_COLORS_MAP","jsx","_jsx","TextToSpeechIcon","status","isActive","isLoading","colorScheme","Blue","color","background","NEUTRAL_1","MessageTextToSpeech","state","disabled","message","variant","model","play","t2s","isTranslated","translation","$isTranslated","getState","icon","size","onPress"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,QAAQ,cAAc;AAChD,SAASC,MAAM,EAAEC,MAAM,QAAQ,4BAA4B;AAE3D,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC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ACC,QAAQ,CAAC,CAAC;MACxDR;IACF,CAAC,CAAC;EACJ;EAEA,oBACEb,IAAA,CAACV,MAAM;IACLsB,QAAQ,EAAEA,QAAS;IACnBT,QAAQ,EAAEA,QAAS;IACnBW,OAAO,EAAE,WAAY;IACrBT,WAAW,EAAEP,kBAAkB,CAACO,WAAW,CAAC,CAACS,OAAO,CAAC,CAACQ,IAAK;IAC3DC,IAAI,EAAE,OAAQ;IACdC,OAAO,EAAER,IAAK;IACdM,IAAI,eACFtB,IAAA,CAACC,gBAAgB;MACfE,QAAQ,EAAEA,QAAS;MACnBC,SAAS,EAAEA,SAAU;MACrBF,MAAM,EAAEA,MAAO;MACfG,WAAW,EAAEA;IAAY,CAC1B;EACF,CACF,CAAC;AAEN,CAAC","ignoreList":[]}
|
|
@@ -3,17 +3,22 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { ChatbotIcon } from "../../../../shared/icons/ChatbotIcon.js";
|
|
6
|
+
import { ColorScheme } from "../../types/style.types.js";
|
|
6
7
|
import { MessageContent } from "./MessageContent.js";
|
|
8
|
+
import { MessageVariant } from "../../types/model.types.js";
|
|
7
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
10
|
export const ReceivedMessage = ({
|
|
9
11
|
message,
|
|
10
12
|
isTranslated,
|
|
11
|
-
t2sState
|
|
13
|
+
t2sState,
|
|
14
|
+
withIcon,
|
|
15
|
+
colorScheme = ColorScheme.Blue,
|
|
16
|
+
withErrorSpotting
|
|
12
17
|
}) => {
|
|
13
18
|
const text = isTranslated ? message.translatedMessage : message.message;
|
|
14
19
|
return /*#__PURE__*/_jsxs(View, {
|
|
15
20
|
style: styles.container,
|
|
16
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
21
|
+
children: [withIcon && /*#__PURE__*/_jsx(View, {
|
|
17
22
|
style: styles.icon,
|
|
18
23
|
children: /*#__PURE__*/_jsx(ChatbotIcon, {
|
|
19
24
|
width: 60,
|
|
@@ -23,8 +28,11 @@ export const ReceivedMessage = ({
|
|
|
23
28
|
style: styles.message,
|
|
24
29
|
children: /*#__PURE__*/_jsx(MessageContent, {
|
|
25
30
|
message: message,
|
|
31
|
+
variant: MessageVariant.RECEIVED,
|
|
26
32
|
t2sState: t2sState,
|
|
27
|
-
text: text ?? ''
|
|
33
|
+
text: text ?? '',
|
|
34
|
+
colorScheme: colorScheme,
|
|
35
|
+
withErrorSpotting: withErrorSpotting
|
|
28
36
|
})
|
|
29
37
|
})]
|
|
30
38
|
});
|
|
@@ -35,7 +43,8 @@ const styles = StyleSheet.create({
|
|
|
35
43
|
flexDirection: 'row',
|
|
36
44
|
maxWidth: 372,
|
|
37
45
|
width: 372,
|
|
38
|
-
alignItems: 'flex-end'
|
|
46
|
+
alignItems: 'flex-end',
|
|
47
|
+
justifyContent: 'flex-end'
|
|
39
48
|
},
|
|
40
49
|
icon: {
|
|
41
50
|
alignSelf: 'flex-end',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","ChatbotIcon","MessageContent","jsx","_jsx","jsxs","_jsxs","ReceivedMessage","message","isTranslated","t2sState","text","translatedMessage","style","styles","container","children","icon","width","height","create","flex","flexDirection","maxWidth","alignItems","alignSelf","marginRight","padding","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","ChatbotIcon","ColorScheme","MessageContent","MessageVariant","jsx","_jsx","jsxs","_jsxs","ReceivedMessage","message","isTranslated","t2sState","withIcon","colorScheme","Blue","withErrorSpotting","text","translatedMessage","style","styles","container","children","icon","width","height","variant","RECEIVED","create","flex","flexDirection","maxWidth","alignItems","justifyContent","alignSelf","marginRight","padding","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAG/C,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC,WAAW,QAAQ,4BAAyB;AACrD,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,OAAO;EACPC,YAAY;EACZC,QAAQ;EACRC,QAAQ;EACRC,WAAW,GAAGZ,WAAW,CAACa,IAAI;EAC9BC;AACY,CAAC,KAAK;EAClB,MAAMC,IAAI,GAAGN,YAAY,GAAGD,OAAO,CAACQ,iBAAiB,GAAGR,OAAO,CAACA,OAAO;EAEvE,oBACEF,KAAA,CAACR,IAAI;IAACmB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,GAC3BT,QAAQ,iBACPP,IAAA,CAACN,IAAI;MAACmB,KAAK,EAAEC,MAAM,CAACG,IAAK;MAAAD,QAAA,eACvBhB,IAAA,CAACL,WAAW;QAACuB,KAAK,EAAE,EAAG;QAACC,MAAM,EAAE;MAAG,CAAE;IAAC,CAClC,CACP,eAEDnB,IAAA,CAACN,IAAI;MAACmB,KAAK,EAAEC,MAAM,CAACV,OAAQ;MAAAY,QAAA,eAC1BhB,IAAA,CAACH,cAAc;QACbO,OAAO,EAAEA,OAAQ;QACjBgB,OAAO,EAAEtB,cAAc,CAACuB,QAAS;QACjCf,QAAQ,EAAEA,QAAS;QACnBK,IAAI,EAAEA,IAAI,IAAI,EAAG;QACjBH,WAAW,EAAEA,WAAY;QACzBE,iBAAiB,EAAEA;MAAkB,CACtC;IAAC,CACE,CAAC;EAAA,CACH,CAAC;AAEX,CAAC;AAED,MAAMI,MAAM,GAAGrB,UAAU,CAAC6B,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,KAAK;IACpBC,QAAQ,EAAE,GAAG;IACbP,KAAK,EAAE,GAAG;IACVQ,UAAU,EAAE,UAAU;IACtBC,cAAc,EAAE;EAClB,CAAC;EACDV,IAAI,EAAE;IACJW,SAAS,EAAE,UAAU;IACrBC,WAAW,EAAE;EACf,CAAC;EACDzB,OAAO,EAAE;IACPmB,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,KAAK;IACpBC,QAAQ,EAAE,GAAG;IACbK,OAAO,EAAE,CAAC;IACVC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEd,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCc,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,sBAAsB,EAAE,CAAC;IACzBC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,14 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { BORDER_RADIUS, COLORS, FONT_FAMILY, SPACING } from '@magmamath/react-native-ui';
|
|
6
|
+
import { MESSAGE_COLORS_MAP } from "../../constants.js";
|
|
7
|
+
import { ColorScheme } from "../../types/style.types.js";
|
|
8
|
+
import { MessageVariant } from "../../types/model.types.js";
|
|
5
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
10
|
export const SentMessage = /*#__PURE__*/React.memo(({
|
|
7
11
|
message,
|
|
8
|
-
isTranslated
|
|
12
|
+
isTranslated,
|
|
13
|
+
colorScheme = ColorScheme.Blue
|
|
9
14
|
}) => {
|
|
10
15
|
const text = isTranslated ? message.translatedMessage : message.message;
|
|
11
16
|
return /*#__PURE__*/_jsx(View, {
|
|
12
|
-
style: styles.container,
|
|
17
|
+
style: [styles.container, {
|
|
18
|
+
backgroundColor: MESSAGE_COLORS_MAP[colorScheme][MessageVariant.SENT].background
|
|
19
|
+
}],
|
|
13
20
|
children: /*#__PURE__*/_jsx(Text, {
|
|
14
21
|
style: styles.text,
|
|
15
22
|
children: text
|
|
@@ -20,16 +27,15 @@ const styles = StyleSheet.create({
|
|
|
20
27
|
container: {
|
|
21
28
|
alignSelf: 'flex-end',
|
|
22
29
|
maxWidth: 305,
|
|
23
|
-
padding:
|
|
24
|
-
borderRadius:
|
|
25
|
-
borderBottomRightRadius: 0
|
|
26
|
-
backgroundColor: '#55ABE0'
|
|
30
|
+
padding: SPACING[200],
|
|
31
|
+
borderRadius: BORDER_RADIUS[200],
|
|
32
|
+
borderBottomRightRadius: 0
|
|
27
33
|
},
|
|
28
34
|
text: {
|
|
29
35
|
fontSize: 20,
|
|
30
36
|
fontWeight: 400,
|
|
31
|
-
fontFamily:
|
|
32
|
-
color:
|
|
37
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
38
|
+
color: COLORS.NEUTRAL_1
|
|
33
39
|
}
|
|
34
40
|
});
|
|
35
41
|
//# sourceMappingURL=SentMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","Text","View","jsx","_jsx","SentMessage","memo","message","isTranslated","text","translatedMessage","style","styles","container","children","create","alignSelf","maxWidth","padding","borderRadius","borderBottomRightRadius","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","View","BORDER_RADIUS","COLORS","FONT_FAMILY","SPACING","MESSAGE_COLORS_MAP","ColorScheme","MessageVariant","jsx","_jsx","SentMessage","memo","message","isTranslated","colorScheme","Blue","text","translatedMessage","style","styles","container","backgroundColor","SENT","background","children","create","alignSelf","maxWidth","padding","borderRadius","borderBottomRightRadius","fontSize","fontWeight","fontFamily","buenosAires","color","NEUTRAL_1"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/SentMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,aAAa,EAAEC,MAAM,EAAEC,WAAW,EAAEC,OAAO,QAAQ,4BAA4B;AAGxF,SAASC,kBAAkB,QAAQ,oBAAiB;AACpD,SAASC,WAAW,QAAQ,4BAAyB;AACrD,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAExD,OAAO,MAAMC,WAAW,gBAAGb,KAAK,CAACc,IAAI,CACnC,CAAC;EAAEC,OAAO;EAAEC,YAAY;EAAEC,WAAW,GAAGR,WAAW,CAACS;AAAmB,CAAC,KAAK;EAC3E,MAAMC,IAAI,GAAGH,YAAY,GAAGD,OAAO,CAACK,iBAAiB,GAAGL,OAAO,CAACA,OAAO;EAEvE,oBACEH,IAAA,CAACT,IAAI;IACHkB,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MAAEC,eAAe,EAAEhB,kBAAkB,CAACS,WAAW,CAAC,CAACP,cAAc,CAACe,IAAI,CAAC,CAACC;IAAW,CAAC,CACpF;IAAAC,QAAA,eAEFf,IAAA,CAACV,IAAI;MAACmB,KAAK,EAAEC,MAAM,CAACH,IAAK;MAAAQ,QAAA,EAAER;IAAI,CAAO;EAAC,CACnC,CAAC;AAEX,CACF,CAAC;AAED,MAAMG,MAAM,GAAGrB,UAAU,CAAC2B,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,SAAS,EAAE,UAAU;IACrBC,QAAQ,EAAE,GAAG;IACbC,OAAO,EAAExB,OAAO,CAAC,GAAG,CAAC;IACrByB,YAAY,EAAE5B,aAAa,CAAC,GAAG,CAAC;IAChC6B,uBAAuB,EAAE;EAC3B,CAAC;EACDd,IAAI,EAAE;IACJe,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE9B,WAAW,CAAC+B,WAAW;IACnCC,KAAK,EAAEjC,MAAM,CAACkC;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ import { ChatMessage } from "../ChatMessage/ChatMessage.js";
|
|
|
7
7
|
import { MessageLoader } from "../ChatMessage/MessageLoader.js";
|
|
8
8
|
import { Alternatives } from "../Alternatives/Alternatives.js";
|
|
9
9
|
import { MessageVariant } from "../../types/model.types.js";
|
|
10
|
+
import { ColorScheme } from "../../types/style.types.js";
|
|
10
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
12
|
const TOOLBAR_HEIGHT = 140;
|
|
12
13
|
const BOTTOM_OFFSET = Platform.select({
|
|
@@ -16,7 +17,8 @@ const BOTTOM_OFFSET = Platform.select({
|
|
|
16
17
|
export const ChatbotMessages = ({
|
|
17
18
|
model,
|
|
18
19
|
isHintFeedback,
|
|
19
|
-
isTextToSpeechEnabled
|
|
20
|
+
isTextToSpeechEnabled,
|
|
21
|
+
colorScheme = ColorScheme.Blue
|
|
20
22
|
}) => {
|
|
21
23
|
const dimensions = useWindowDimensions();
|
|
22
24
|
const ref = useRef(null);
|
|
@@ -26,10 +28,12 @@ export const ChatbotMessages = ({
|
|
|
26
28
|
const currentPlayingId = useUnit(model.t2s.$currentPlayingId);
|
|
27
29
|
const isTranslated = useUnit(model.translation.$isTranslated);
|
|
28
30
|
const audioStatus = useUnit(model.t2s.$status);
|
|
29
|
-
const
|
|
31
|
+
const errorSpottingEnabled = useUnit(model.errorSpotting.$isEnabled);
|
|
30
32
|
const messages = useStoreMap(model.$currentChatData, ({
|
|
31
33
|
messages
|
|
32
34
|
}) => messages);
|
|
35
|
+
const lastMessageId = messages.at(-1)?.id;
|
|
36
|
+
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET;
|
|
33
37
|
const askChatForHelp = (message, translatedMessage) => {
|
|
34
38
|
void model.sendHelpRequestFx({
|
|
35
39
|
message,
|
|
@@ -54,8 +58,11 @@ export const ChatbotMessages = ({
|
|
|
54
58
|
style: styles.gap,
|
|
55
59
|
children: [messages.map(message => /*#__PURE__*/_jsx(ChatMessage, {
|
|
56
60
|
isTranslated: isTranslated,
|
|
61
|
+
withIcon: !message.isOwnMessage && message.id === lastMessageId,
|
|
57
62
|
message: message,
|
|
58
63
|
variant: message.isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED,
|
|
64
|
+
colorScheme: colorScheme,
|
|
65
|
+
withErrorSpotting: errorSpottingEnabled && !message.isOwnMessage,
|
|
59
66
|
t2sState: {
|
|
60
67
|
isEnabled: isTextToSpeechEnabled && !message.isOwnMessage,
|
|
61
68
|
isActive: message.id === currentPlayingId,
|
|
@@ -63,11 +70,14 @@ export const ChatbotMessages = ({
|
|
|
63
70
|
status: audioStatus,
|
|
64
71
|
disabled: isTextToSpeechPending
|
|
65
72
|
}
|
|
66
|
-
}, message.id)), isHelpRequestPending && /*#__PURE__*/_jsx(MessageLoader, {
|
|
73
|
+
}, message.id)), isHelpRequestPending && /*#__PURE__*/_jsx(MessageLoader, {
|
|
74
|
+
colorScheme: colorScheme
|
|
75
|
+
})]
|
|
67
76
|
}), !isHelpRequestPending && isOpen && /*#__PURE__*/_jsx(Alternatives, {
|
|
68
77
|
onPressAlternative: askChatForHelp,
|
|
69
78
|
hasMessages: messages.length > 1,
|
|
70
|
-
isHintFeedback: isHintFeedback
|
|
79
|
+
isHintFeedback: isHintFeedback,
|
|
80
|
+
colorScheme: colorScheme
|
|
71
81
|
})]
|
|
72
82
|
})
|
|
73
83
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","MessageVariant","jsx","_jsx","jsxs","_jsxs","TOOLBAR_HEIGHT","BOTTOM_OFFSET","select","web","default","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","dimensions","ref","isOpen","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","
|
|
1
|
+
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","MessageVariant","ColorScheme","jsx","_jsx","jsxs","_jsxs","TOOLBAR_HEIGHT","BOTTOM_OFFSET","select","web","default","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","colorScheme","Blue","dimensions","ref","isOpen","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","errorSpottingEnabled","errorSpotting","$isEnabled","messages","$currentChatData","lastMessageId","at","id","MAX_HEIGHT","height","askChatForHelp","message","translatedMessage","style","styles","container","maxHeight","children","bounces","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","withIcon","isOwnMessage","variant","SENT","RECEIVED","withErrorSpotting","t2sState","isEnabled","isActive","isLoading","status","disabled","onPressAlternative","hasMessages","length","create","flex","alignItems","width","paddingVertical","paddingRight"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,IAAI,QAAQ,cAAc;AAC1F,SAASC,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AAGrD,SAASC,WAAW,QAAQ,+BAA4B;AACxD,SAASC,aAAa,QAAQ,iCAA8B;AAC5D,SA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oB,IAAI,CAACW,OAAO,CAACkB,YAAa;UACjEK,QAAQ,EAAE;YACRC,SAAS,EAAExD,qBAAqB,IAAI,CAACgC,OAAO,CAACkB,YAAY;YACzDO,QAAQ,EAAEzB,OAAO,CAACJ,EAAE,KAAKf,gBAAgB;YACzC6C,SAAS,EAAEhD,qBAAqB;YAChCiD,MAAM,EAAExC,WAAW;YACnByC,QAAQ,EAAElD;UACZ;QAAE,GAbGsB,OAAO,CAACJ,EAcd,CACF,CAAC,EAEDrB,oBAAoB,iBAAIlB,IAAA,CAACL,aAAa;UAACiB,WAAW,EAAEA;QAAY,CAAE,CAAC;MAAA,CAChE,CACP,EAEA,CAACM,oBAAoB,IAAIF,MAAM,iBAC9BhB,IAAA,CAACJ,YAAY;QACX4E,kBAAkB,EAAE9B,cAAe;QACnC+B,WAAW,EAAEtC,QAAQ,CAACuC,MAAM,GAAG,CAAE;QACjChE,cAAc,EAAEA,cAAe;QAC/BE,WAAW,EAAEA;MAAY,CAC1B,CACF;IAAA,CACS;EAAC,CACT,CAAC;AAEX,CAAC;AAED,MAAMkC,MAAM,GAAGzD,UAAU,CAACsF,MAAM,CAAC;EAC/B5B,SAAS,EAAE;IACT6B,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,UAAU;IACtBC,KAAK,EAAE,GAAG;IACVrC,MAAM,EAAE;EACV,CAAC;EACDW,IAAI,EAAE;IACJyB,UAAU,EAAE,UAAU;IACtBE,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE;EAChB,CAAC;EACDtB,GAAG,EAAE;IACHkB,IAAI,EAAE,CAAC;IACPlB,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import { useStoreMap, useUnit } from 'effector-react';
|
|
4
5
|
import { ChatbotMessages } from "./ChatMessages/ChatbotMessages.js";
|
|
5
6
|
import { ChatControls } from "./ChatControls/ChatControls.js";
|
|
6
|
-
import React from 'react';
|
|
7
7
|
import { ChatBotModelContext } from "../context/ChatBotModelContext.js";
|
|
8
|
+
import { ColorScheme } from "../types/style.types.js";
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
export const Chatbot = ({
|
|
10
11
|
model,
|
|
@@ -12,7 +13,8 @@ export const Chatbot = ({
|
|
|
12
13
|
isTextToSpeechEnabled = false,
|
|
13
14
|
textToSpeechConfig,
|
|
14
15
|
ButtonWrapper,
|
|
15
|
-
iconSize
|
|
16
|
+
iconSize,
|
|
17
|
+
colorScheme = ColorScheme.Blue
|
|
16
18
|
}) => {
|
|
17
19
|
const alternatives = useUnit(model.$alternatives);
|
|
18
20
|
const isAvailable = useStoreMap(model.$currentChatData, ({
|
|
@@ -28,6 +30,7 @@ export const Chatbot = ({
|
|
|
28
30
|
value: model,
|
|
29
31
|
children: [/*#__PURE__*/_jsx(ChatbotMessages, {
|
|
30
32
|
model: model,
|
|
33
|
+
colorScheme: colorScheme,
|
|
31
34
|
isHintFeedback: isHintFeedback,
|
|
32
35
|
isTextToSpeechEnabled: isTextToSpeechEnabled
|
|
33
36
|
}), /*#__PURE__*/_jsx(ChatControls, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStoreMap","useUnit","ChatbotMessages","ChatControls","
|
|
1
|
+
{"version":3,"names":["React","useStoreMap","useUnit","ChatbotMessages","ChatControls","ChatBotModelContext","ColorScheme","jsx","_jsx","jsxs","_jsxs","Chatbot","model","isHintFeedback","isTextToSpeechEnabled","textToSpeechConfig","ButtonWrapper","iconSize","colorScheme","Blue","alternatives","$alternatives","isAvailable","$currentChatData","t2s","setAudioConfig","openChat","setIsOpen","closeChat","chatAccess","Provider","value","children","onPressChatIcon","onPressClose"],"sourceRoot":"../../../../../src","sources":["features/chatbot/components/Chatbot.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAA4C,OAAO;AAC/D,SA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C1BQ,YAAY,EAAEN,SAAU;MACxBZ,aAAa,EAAEA,aAAc;MAC7BC,QAAQ,EAAEA;IAAS,CACpB,CAAC;EAAA,CAC0B,CAAC;AAEnC,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useEffect, useMemo } from 'react';
|
|
3
|
+
import React, { useEffect, useMemo } from 'react';
|
|
5
4
|
import { View, Animated, StyleSheet, Platform } from 'react-native';
|
|
5
|
+
import { COLORS } from '@magmamath/react-native-ui';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export const ThreeDotsLoader = ({
|
|
8
8
|
dotsCount = 3,
|
|
9
9
|
animationDuration = 250,
|
|
10
|
-
backgroundColor =
|
|
10
|
+
backgroundColor = COLORS.PRIMARY_BLUE
|
|
11
11
|
}) => {
|
|
12
12
|
const isWeb = Platform.OS === 'web';
|
|
13
13
|
const animations = useMemo(() => [...Array(dotsCount)].map(() => new Animated.Value(0)), [dotsCount]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useMemo","View","Animated","StyleSheet","Platform","jsx","_jsx","ThreeDotsLoader","dotsCount","animationDuration","backgroundColor","isWeb","OS","animations","Array","map","Value","animationsArray","anim","index","sequence","timing","toValue","duration","useNativeDriver","delay","loop","parallel","start","style","styles","container","children","translateY","interpolate","inputRange","outputRange","dot","transform","create","flexDirection","justifyContent","alignItems","borderRadius","height","width","marginHorizontal"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,
|
|
1
|
+
{"version":3,"names":["React","useEffect","useMemo","View","Animated","StyleSheet","Platform","COLORS","jsx","_jsx","ThreeDotsLoader","dotsCount","animationDuration","backgroundColor","PRIMARY_BLUE","isWeb","OS","animations","Array","map","Value","animationsArray","anim","index","sequence","timing","toValue","duration","useNativeDriver","delay","loop","parallel","start","style","styles","container","children","translateY","interpolate","inputRange","outputRange","dot","transform","create","flexDirection","justifyContent","alignItems","borderRadius","height","width","marginHorizontal"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACjD,SAASC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AAEnE,SAASC,MAAM,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAQnD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,SAAS,GAAG,CAAC;EACbC,iBAAiB,GAAG,GAAG;EACvBC,eAAe,GAAGN,MAAM,CAACO;AACV,CAAC,KAAK;EACrB,MAAMC,KAAK,GAAGT,QAAQ,CAACU,EAAE,KAAK,KAAK;EACnC,MAAMC,UAAU,GAAGf,OAAO,CACxB,MAAM,CAAC,GAAGgB,KAAK,CAACP,SAAS,CAAC,CAAC,CAACQ,GAAG,CAAC,MAAM,IAAIf,QAAQ,CAACgB,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,CAACT,SAAS,CACZ,CAAC;EAEDV,SAAS,CAAC,MAAM;IACd,MAAMoB,eAAe,GAAGJ,UAAU,CAACE,GAAG,CAAC,CAACG,IAAI,EAAEC,KAAK,KACjDnB,QAAQ,CAACoB,QAAQ,CAAC,CAChBpB,QAAQ,CAACqB,MAAM,CAACH,IAAI,EAAE;MACpBI,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAEf,iBAAiB;MAC3BgB,eAAe,EAAE,CAACb,KAAK;MACvBc,KAAK,EAAEN,KAAK,IAAIX,iBAAiB,GAAGD,SAAS;IAC/C,CAAC,CAAC,EACFP,QAAQ,CAACqB,MAAM,CAACH,IAAI,EAAE;MACpBI,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAE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'react-native';
|
|
5
|
+
import { MessageVariant } from "./types/model.types.js";
|
|
6
|
+
import { ColorScheme } from "./types/style.types.js";
|
|
4
7
|
export const AUDIO_CONFIG = {
|
|
5
8
|
audioEncoding: 'LINEAR16',
|
|
6
9
|
pitch: 0,
|
|
@@ -33,4 +36,36 @@ export const KATEX_REPLACEMENTS = {
|
|
|
33
36
|
export const KATEX_REPLACEMENTS_REVERSE = {
|
|
34
37
|
__KATEX_DOLLAR_SYMBOL__: '$'
|
|
35
38
|
};
|
|
39
|
+
export const MESSAGE_COLORS_MAP = {
|
|
40
|
+
[ColorScheme.Blue]: {
|
|
41
|
+
[MessageVariant.RECEIVED]: {
|
|
42
|
+
background: COLORS.NEUTRAL_3,
|
|
43
|
+
icon: ButtonColor.BLUE
|
|
44
|
+
},
|
|
45
|
+
[MessageVariant.SENT]: {
|
|
46
|
+
background: COLORS.PRIMARY_BLUE,
|
|
47
|
+
icon: ButtonColor.BLUE
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
[ColorScheme.Yellow]: {
|
|
51
|
+
[MessageVariant.RECEIVED]: {
|
|
52
|
+
background: COLORS.NEUTRAL_3,
|
|
53
|
+
icon: ButtonColor.YELLOW
|
|
54
|
+
},
|
|
55
|
+
[MessageVariant.SENT]: {
|
|
56
|
+
background: COLORS.PRIMARY_YELLOW,
|
|
57
|
+
icon: ButtonColor.YELLOW
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export const CONTROLS_COLORS_MAP = {
|
|
62
|
+
[ColorScheme.Blue]: {
|
|
63
|
+
hover: COLORS.PRIMARY_BLUE,
|
|
64
|
+
background: COLORS.PRIMARY_BLUE
|
|
65
|
+
},
|
|
66
|
+
[ColorScheme.Yellow]: {
|
|
67
|
+
hover: COLORS.PRIMARY_YELLOW,
|
|
68
|
+
background: COLORS.PRIMARY_YELLOW
|
|
69
|
+
}
|
|
70
|
+
};
|
|
36
71
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","AUDIO_CONFIG","audioEncoding","pitch","speakingRate","DEFAULT_VOICE","languageCode","name","TEXT_TO_SPEECH_CONFIG","select","ios","audioConfig","voice","default","KATEX_REPLACEMENTS","KATEX_REPLACEMENTS_REVERSE","__KATEX_DOLLAR_SYMBOL__"],"sourceRoot":"../../../../src","sources":["features/chatbot/constants.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["ButtonColor","COLORS","Platform","MessageVariant","ColorScheme","AUDIO_CONFIG","audioEncoding","pitch","speakingRate","DEFAULT_VOICE","languageCode","name","TEXT_TO_SPEECH_CONFIG","select","ios","audioConfig","voice","default","KATEX_REPLACEMENTS","KATEX_REPLACEMENTS_REVERSE","__KATEX_DOLLAR_SYMBOL__","MESSAGE_COLORS_MAP","Blue","RECEIVED","background","NEUTRAL_3","icon","BLUE","SENT","PRIMARY_BLUE","Yellow","YELLOW","PRIMARY_YELLOW","CONTROLS_COLORS_MAP","hover"],"sourceRoot":"../../../../src","sources":["features/chatbot/constants.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,MAAM,QAAQ,4BAA4B;AAChE,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,cAAc,QAAQ,wBAAqB;AACpD,SAASC,WAAW,QAAQ,wBAAqB;AAEjD,OAAO,MAAMC,YAAY,GAAG;EAC1BC,aAAa,EAAE,UAAU;EACzBC,KAAK,EAAE,CAAC;EACRC,YAAY,EAAE;AAChB,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG;EAC3BC,YAAY,EAAE,OAAO;EACrBC,IAAI,EAAE;AACR,CAAC;AAED,OAAO,MAAMC,qBAAqB,GAAGV,QAAQ,CAACW,MAAM,CAAC;EACnDC,GAAG,EAAE;IACHC,WAAW,EAAE;MACXT,aAAa,EAAE,KAAK;MACpBC,KAAK,EAAE,GAAG;MACVC,YAAY,EAAE;IAChB,CAAC;IACDQ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