@magmamath/students-features 0.10.0-rc.7 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/celebrations/helpers.js +1 -4
- package/dist/commonjs/features/celebrations/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js +19 -41
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +2 -7
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +4 -16
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +2 -6
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +4 -17
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +1 -2
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +2 -19
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +11 -32
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +2 -2
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/t2s.js +107 -0
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -0
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/t2s.types.js.map +1 -1
- package/dist/commonjs/features/feedback/model/model.js.map +1 -1
- package/dist/commonjs/features/feedback/model/sockets.js +5 -8
- package/dist/commonjs/features/feedback/model/sockets.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +2 -2
- package/dist/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicLayout/BasicLayout.js +2 -2
- package/dist/commonjs/features/keyboard/components/BasicLayout/BasicLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.js +4 -4
- package/dist/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js +2 -2
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js +4 -4
- package/dist/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/Keyboard.js +2 -4
- package/dist/commonjs/features/keyboard/components/Keyboard.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/MainLayout/MainLayout.js +6 -1
- package/dist/commonjs/features/keyboard/components/MainLayout/MainLayout.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/UnitTabs.js +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/helpers.js +1 -3
- package/dist/commonjs/features/keyboard/components/UnitsLayout/helpers.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +6 -27
- package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.js +1 -9
- package/dist/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.js.map +1 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/types.js +0 -1
- package/dist/commonjs/features/keyboard/components/UnitsLayout/types.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/constants.js +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js +1 -2
- package/dist/commonjs/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js +4 -20
- package/dist/commonjs/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/commonjs/features/keyboard/helpers.js +0 -7
- package/dist/commonjs/features/keyboard/helpers.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js +3 -20
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/units.js +3 -6
- package/dist/commonjs/features/keyboard/types/MathKeysGroups/units.js.map +1 -1
- package/dist/commonjs/index.js +1 -13
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/keyboard/CDotIcon/CDotIcon.js +4 -4
- package/dist/commonjs/shared/icons/keyboard/CDotIcon/CDotIcon.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +1 -2
- package/dist/commonjs/shared/translation/localization/de.json +1 -2
- package/dist/commonjs/shared/translation/localization/en.json +1 -2
- package/dist/commonjs/shared/translation/localization/gb.json +1 -2
- package/dist/commonjs/shared/translation/localization/sct.json +1 -2
- package/dist/commonjs/shared/translation/localization/sw.json +1 -2
- package/dist/commonjs/types/common.types.js +0 -4
- package/dist/module/features/celebrations/helpers.js +1 -4
- package/dist/module/features/celebrations/helpers.js.map +1 -1
- package/dist/module/features/chatbot/components/Chat/Chat.js +19 -41
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +2 -5
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +4 -16
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +2 -6
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +4 -17
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +0 -1
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +2 -19
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +11 -32
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +2 -2
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/module/features/chatbot/model/t2s.js +102 -0
- package/dist/module/features/chatbot/model/t2s.js.map +1 -0
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/chatbot/types/t2s.types.js.map +1 -1
- package/dist/module/features/feedback/model/model.js.map +1 -1
- package/dist/module/features/feedback/model/sockets.js +5 -8
- package/dist/module/features/feedback/model/sockets.js.map +1 -1
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js +3 -3
- package/dist/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicLayout/BasicLayout.js +2 -2
- package/dist/module/features/keyboard/components/BasicLayout/BasicLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.js +4 -4
- package/dist/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js +2 -2
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js +4 -4
- package/dist/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.js.map +1 -1
- package/dist/module/features/keyboard/components/Keyboard.js +2 -4
- package/dist/module/features/keyboard/components/Keyboard.js.map +1 -1
- package/dist/module/features/keyboard/components/KeysList/KeysList.js.map +1 -1
- package/dist/module/features/keyboard/components/MainLayout/MainLayout.js +7 -2
- package/dist/module/features/keyboard/components/MainLayout/MainLayout.js.map +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/UnitTabs.js +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/helpers.js +1 -2
- package/dist/module/features/keyboard/components/UnitsLayout/helpers.js.map +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +6 -27
- package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/keyboardGroups.js +1 -9
- package/dist/module/features/keyboard/components/UnitsLayout/keyboardGroups.js.map +1 -1
- package/dist/module/features/keyboard/components/UnitsLayout/types.js +0 -1
- package/dist/module/features/keyboard/components/UnitsLayout/types.js.map +1 -1
- package/dist/module/features/keyboard/constants/constants.js +1 -1
- package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js +2 -3
- package/dist/module/features/keyboard/constants/keyboardGroupsByLocale.js.map +1 -1
- package/dist/module/features/keyboard/constants/keyboardLayouts.js +4 -19
- package/dist/module/features/keyboard/constants/keyboardLayouts.js.map +1 -1
- package/dist/module/features/keyboard/helpers.js +0 -5
- package/dist/module/features/keyboard/helpers.js.map +1 -1
- package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js +3 -20
- package/dist/module/features/keyboard/types/MathKeysGroups/basicOperators.js.map +1 -1
- package/dist/module/features/keyboard/types/MathKeysGroups/units.js +3 -6
- package/dist/module/features/keyboard/types/MathKeysGroups/units.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/keyboard/CDotIcon/CDotIcon.js +4 -4
- package/dist/module/shared/icons/keyboard/CDotIcon/CDotIcon.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +1 -2
- package/dist/module/shared/translation/localization/de.json +1 -2
- package/dist/module/shared/translation/localization/en.json +1 -2
- package/dist/module/shared/translation/localization/gb.json +1 -2
- package/dist/module/shared/translation/localization/sct.json +1 -2
- package/dist/module/shared/translation/localization/sw.json +1 -2
- package/dist/module/types/common.types.js +0 -2
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +2 -6
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -3
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts +2 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.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/Chatbot.d.ts +1 -4
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +2 -3
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +3 -5
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +3 -4
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +34 -0
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +16 -28
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +11 -14
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +0 -25
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/model/model.d.ts +1 -4
- package/dist/typescript/commonjs/features/feedback/model/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/feedback/model/sockets.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicPlusLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts +1 -2
- package/dist/typescript/commonjs/features/keyboard/components/Keyboard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/MainLayout/MainLayout.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/helpers.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts +7 -4
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/types.d.ts +1 -7
- package/dist/typescript/commonjs/features/keyboard/components/UnitsLayout/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/constants.d.ts +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts +0 -4
- package/dist/typescript/commonjs/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/helpers.d.ts +0 -1
- package/dist/typescript/commonjs/features/keyboard/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +0 -10
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/units.d.ts +0 -36
- package/dist/typescript/commonjs/features/keyboard/types/MathKeysGroups/units.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts +1 -1
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -6
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -2
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +0 -2
- package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
- package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts +2 -6
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -3
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts +2 -4
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.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/Chatbot.d.ts +1 -4
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +2 -3
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +3 -5
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +3 -4
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts +34 -0
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +16 -28
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +11 -14
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +0 -25
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/model/model.d.ts +1 -4
- package/dist/typescript/module/features/feedback/model/model.d.ts.map +1 -1
- package/dist/typescript/module/features/feedback/model/sockets.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/AlgebraLayout/AlgebraLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/BasicPlusLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts +1 -2
- package/dist/typescript/module/features/keyboard/components/Keyboard.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/MainLayout/MainLayout.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/helpers.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts +7 -4
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/keyboardGroups.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/types.d.ts +1 -7
- package/dist/typescript/module/features/keyboard/components/UnitsLayout/types.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/constants.d.ts +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboardGroupsByLocale.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts +0 -4
- package/dist/typescript/module/features/keyboard/constants/keyboardLayouts.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/helpers.d.ts +0 -1
- package/dist/typescript/module/features/keyboard/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts +0 -10
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/basicOperators.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/units.d.ts +0 -36
- package/dist/typescript/module/features/keyboard/types/MathKeysGroups/units.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts +1 -1
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -6
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +0 -2
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/types/common.types.d.ts +0 -2
- package/dist/typescript/module/types/common.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/celebrations/helpers.ts +33 -35
- package/src/features/chatbot/components/Chat/Chat.tsx +22 -48
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +2 -9
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +1 -3
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +3 -25
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +0 -4
- package/src/features/chatbot/components/Chatbot.tsx +2 -19
- package/src/features/chatbot/constants.ts +0 -2
- package/src/features/chatbot/helpers.ts +1 -14
- package/src/features/chatbot/index.ts +2 -17
- package/src/features/chatbot/model/ChatBotModel.ts +13 -51
- package/src/features/chatbot/model/ChatBotThreadManager.ts +4 -12
- package/src/features/chatbot/model/ChatbotApi.ts +1 -1
- package/src/features/chatbot/model/ChatsCacheModel.ts +0 -4
- package/src/features/chatbot/model/t2s.ts +123 -0
- package/src/features/chatbot/types/api.types.ts +19 -25
- package/src/features/chatbot/types/model.types.ts +12 -24
- package/src/features/chatbot/types/t2s.types.ts +0 -33
- package/src/features/feedback/model/model.ts +1 -4
- package/src/features/feedback/model/sockets.ts +6 -8
- package/src/features/keyboard/components/AlgebraLayout/AlgebraLayout.tsx +3 -4
- package/src/features/keyboard/components/BasicLayout/BasicLayout.tsx +2 -2
- package/src/features/keyboard/components/BasicPlusLayout/keyboardGroups.ts +17 -27
- package/src/features/keyboard/components/BasicPlusPlusLayout/BasicPlusPlusLayout.tsx +2 -3
- package/src/features/keyboard/components/BasicPlusPlusLayout/keyboardGroups.ts +24 -30
- package/src/features/keyboard/components/Keyboard.tsx +4 -14
- package/src/features/keyboard/components/KeysList/KeysList.tsx +1 -1
- package/src/features/keyboard/components/MainLayout/MainLayout.tsx +6 -2
- package/src/features/keyboard/components/UnitsLayout/UnitTabs.tsx +1 -1
- package/src/features/keyboard/components/UnitsLayout/helpers.tsx +0 -3
- package/src/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.ts +22 -36
- package/src/features/keyboard/components/UnitsLayout/keyboardGroups.ts +0 -11
- package/src/features/keyboard/components/UnitsLayout/types.ts +0 -7
- package/src/features/keyboard/constants/constants.ts +1 -1
- package/src/features/keyboard/constants/keyboardGroupsByLocale.ts +0 -2
- package/src/features/keyboard/constants/keyboardLayouts.ts +1 -18
- package/src/features/keyboard/helpers.ts +0 -6
- package/src/features/keyboard/types/MathKeysGroups/basicOperators.tsx +3 -15
- package/src/features/keyboard/types/MathKeysGroups/units.tsx +0 -3
- package/src/index.ts +0 -1
- package/src/lib/effector/createControllerEffect.ts +1 -1
- package/src/shared/icons/keyboard/CDotIcon/CDotIcon.tsx +2 -2
- package/src/shared/translation/localization/ca.json +1 -2
- package/src/shared/translation/localization/de.json +1 -2
- package/src/shared/translation/localization/en.json +1 -2
- package/src/shared/translation/localization/gb.json +1 -2
- package/src/shared/translation/localization/sct.json +1 -2
- package/src/shared/translation/localization/sw.json +1 -2
- package/src/types/common.types.ts +0 -4
- package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/commonjs/features/chatbot/helpers/ttsHighlight.js +0 -29
- package/dist/commonjs/features/chatbot/helpers/ttsHighlight.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatTTSHighlightModel.js +0 -56
- package/dist/commonjs/features/chatbot/model/ChatTTSHighlightModel.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatTTSModel.js +0 -154
- package/dist/commonjs/features/chatbot/model/ChatTTSModel.js.map +0 -1
- package/dist/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.js +0 -34
- package/dist/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.js.map +0 -1
- package/dist/commonjs/features/openEnded/components/OpenEndedScoreLabel.js +0 -77
- package/dist/commonjs/features/openEnded/components/OpenEndedScoreLabel.js.map +0 -1
- package/dist/commonjs/features/openEnded/index.js +0 -48
- package/dist/commonjs/features/openEnded/index.js.map +0 -1
- package/dist/commonjs/features/openEnded/oe.helpers.js +0 -26
- package/dist/commonjs/features/openEnded/oe.helpers.js.map +0 -1
- package/dist/commonjs/features/openEnded/oe.types.js +0 -14
- package/dist/commonjs/features/openEnded/oe.types.js.map +0 -1
- package/dist/commonjs/lib/components/ConditionalWrapper.js +0 -23
- package/dist/commonjs/lib/components/ConditionalWrapper.js.map +0 -1
- package/dist/commonjs/shared/common.constants.js +0 -9
- package/dist/commonjs/shared/common.constants.js.map +0 -1
- package/dist/commonjs/shared/icons/TimeIcon.js +0 -37
- package/dist/commonjs/shared/icons/TimeIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js +0 -32
- package/dist/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js +0 -32
- package/dist/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js.map +0 -1
- package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/module/features/chatbot/helpers/ttsHighlight.js +0 -23
- package/dist/module/features/chatbot/helpers/ttsHighlight.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatTTSHighlightModel.js +0 -52
- package/dist/module/features/chatbot/model/ChatTTSHighlightModel.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatTTSModel.js +0 -149
- package/dist/module/features/chatbot/model/ChatTTSModel.js.map +0 -1
- package/dist/module/features/openEnded/components/OpenEndedAttemptsLimit.js +0 -28
- package/dist/module/features/openEnded/components/OpenEndedAttemptsLimit.js.map +0 -1
- package/dist/module/features/openEnded/components/OpenEndedScoreLabel.js +0 -71
- package/dist/module/features/openEnded/components/OpenEndedScoreLabel.js.map +0 -1
- package/dist/module/features/openEnded/index.js +0 -7
- package/dist/module/features/openEnded/index.js.map +0 -1
- package/dist/module/features/openEnded/oe.helpers.js +0 -21
- package/dist/module/features/openEnded/oe.helpers.js.map +0 -1
- package/dist/module/features/openEnded/oe.types.js +0 -10
- package/dist/module/features/openEnded/oe.types.js.map +0 -1
- package/dist/module/lib/components/ConditionalWrapper.js +0 -17
- package/dist/module/lib/components/ConditionalWrapper.js.map +0 -1
- package/dist/module/shared/common.constants.js +0 -5
- package/dist/module/shared/common.constants.js.map +0 -1
- package/dist/module/shared/icons/TimeIcon.js +0 -29
- package/dist/module/shared/icons/TimeIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js +0 -24
- package/dist/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.js.map +0 -1
- package/dist/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js +0 -24
- package/dist/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/helpers/ttsHighlight.d.ts +0 -8
- package/dist/typescript/commonjs/features/chatbot/helpers/ttsHighlight.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatTTSHighlightModel.d.ts +0 -25
- package/dist/typescript/commonjs/features/chatbot/model/ChatTTSHighlightModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatTTSModel.d.ts +0 -38
- package/dist/typescript/commonjs/features/chatbot/model/ChatTTSModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.d.ts +0 -7
- package/dist/typescript/commonjs/features/openEnded/components/OpenEndedAttemptsLimit.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/components/OpenEndedScoreLabel.d.ts +0 -12
- package/dist/typescript/commonjs/features/openEnded/components/OpenEndedScoreLabel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/index.d.ts +0 -5
- package/dist/typescript/commonjs/features/openEnded/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/oe.helpers.d.ts +0 -13
- package/dist/typescript/commonjs/features/openEnded/oe.helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/openEnded/oe.types.d.ts +0 -7
- package/dist/typescript/commonjs/features/openEnded/oe.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/components/ConditionalWrapper.d.ts +0 -9
- package/dist/typescript/commonjs/lib/components/ConditionalWrapper.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/common.constants.d.ts +0 -2
- package/dist/typescript/commonjs/shared/common.constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/TimeIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/TimeIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/helpers/ttsHighlight.d.ts +0 -8
- package/dist/typescript/module/features/chatbot/helpers/ttsHighlight.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatTTSHighlightModel.d.ts +0 -25
- package/dist/typescript/module/features/chatbot/model/ChatTTSHighlightModel.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatTTSModel.d.ts +0 -38
- package/dist/typescript/module/features/chatbot/model/ChatTTSModel.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/components/OpenEndedAttemptsLimit.d.ts +0 -7
- package/dist/typescript/module/features/openEnded/components/OpenEndedAttemptsLimit.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/components/OpenEndedScoreLabel.d.ts +0 -12
- package/dist/typescript/module/features/openEnded/components/OpenEndedScoreLabel.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/index.d.ts +0 -5
- package/dist/typescript/module/features/openEnded/index.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/oe.helpers.d.ts +0 -13
- package/dist/typescript/module/features/openEnded/oe.helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/openEnded/oe.types.d.ts +0 -7
- package/dist/typescript/module/features/openEnded/oe.types.d.ts.map +0 -1
- package/dist/typescript/module/lib/components/ConditionalWrapper.d.ts +0 -9
- package/dist/typescript/module/lib/components/ConditionalWrapper.d.ts.map +0 -1
- package/dist/typescript/module/shared/common.constants.d.ts +0 -2
- package/dist/typescript/module/shared/common.constants.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/TimeIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/TimeIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.d.ts.map +0 -1
- package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/src/features/chatbot/helpers/ttsHighlight.ts +0 -25
- package/src/features/chatbot/model/ChatTTSHighlightModel.ts +0 -64
- package/src/features/chatbot/model/ChatTTSModel.ts +0 -168
- package/src/features/openEnded/components/OpenEndedAttemptsLimit.tsx +0 -26
- package/src/features/openEnded/components/OpenEndedScoreLabel.tsx +0 -81
- package/src/features/openEnded/index.ts +0 -4
- package/src/features/openEnded/oe.helpers.ts +0 -31
- package/src/features/openEnded/oe.types.ts +0 -6
- package/src/lib/components/ConditionalWrapper.tsx +0 -15
- package/src/shared/common.constants.ts +0 -3
- package/src/shared/icons/TimeIcon.tsx +0 -23
- package/src/shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.tsx +0 -18
- package/src/shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon.tsx +0 -18
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# TTS Word-by-Word Highlighting
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Word-by-word text highlighting synchronized with text-to-speech playback in the chatbot. The feature is optional and enabled via `isWordHighlightEnabled` config flag.
|
|
6
|
-
|
|
7
|
-
## How It Works
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
11
|
-
│ 1. User clicks TTS button on a message │
|
|
12
|
-
│ ↓ │
|
|
13
|
-
│ 2. Text is converted to SSML with word marks │
|
|
14
|
-
│ "Hello world" → <speak><mark name="w_0"/>Hello │
|
|
15
|
-
│ <mark name="w_1"/>world</speak> │
|
|
16
|
-
│ ↓ │
|
|
17
|
-
│ 3. Google TTS API returns audio + timepoints │
|
|
18
|
-
│ [{ markName: "w_0", timeSeconds: 0.0 }, │
|
|
19
|
-
│ { markName: "w_1", timeSeconds: 0.5 }] │
|
|
20
|
-
│ ↓ │
|
|
21
|
-
│ 4. Audio plays, onTimeUpdate fires via RAF loop │
|
|
22
|
-
│ ↓ │
|
|
23
|
-
│ 5. Current time → find matching timepoint → word index │
|
|
24
|
-
│ ↓ │
|
|
25
|
-
│ 6. $highlightedWordIndex updates → UI re-renders highlighted │
|
|
26
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Usage
|
|
30
|
-
|
|
31
|
-
```tsx
|
|
32
|
-
// In students-web model setup
|
|
33
|
-
chatModel.bot.setUpT2S({
|
|
34
|
-
audioProvider: createT2SAudioProvider(),
|
|
35
|
-
textSanitizer: removeKatexPartFromTextToSpeech,
|
|
36
|
-
isWordHighlightEnabled: true,
|
|
37
|
-
})
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Architecture
|
|
41
|
-
|
|
42
|
-
### ChatTTSModel (ChatTTSModel.ts)
|
|
43
|
-
|
|
44
|
-
Handles TTS playback and word highlighting. Key design decisions:
|
|
45
|
-
|
|
46
|
-
- **Map-based cache** — `audioCache: Map<string, AudioCache>` stores both `audioPath` and `timepoints` per message. When highlighting is off, `timepoints` is `[]`. Cache lives for the model's lifetime (cleared when user leaves the problem).
|
|
47
|
-
- **`fetchAudio()` method** — encapsulates API call + audioContent decoding. Highlight vs non-highlight differences are ternaries (SSML vs plain text, `enableTimePointing`).
|
|
48
|
-
- **`play()` is linear** — cache lookup → fetch if miss → store → activate highlight if enabled → play audio. No branching between highlight/non-highlight paths.
|
|
49
|
-
- **Pause/resume guards** — `wordHighlightEnabled` check before toggling `setIsActive(false)`/`setIsActive(true)` on pause/resume.
|
|
50
|
-
- **`wordHighlightEnabled` (private)** — stored result of `!!isWordHighlightEnabled && !!audioProvider.onTimeUpdate`. Set once at `setConfig`.
|
|
51
|
-
- **`isWordHighlightEnabled` (public getter)** — read-only access for external consumers (e.g. `Chat.tsx`).
|
|
52
|
-
|
|
53
|
-
### AudioProvider type
|
|
54
|
-
|
|
55
|
-
```typescript
|
|
56
|
-
type AudioProvider = {
|
|
57
|
-
play: (audioPath: string, onPlaybackComplete: () => void) => Promise<void>
|
|
58
|
-
pause: () => void
|
|
59
|
-
resume: () => void
|
|
60
|
-
stop: () => void
|
|
61
|
-
onTimeUpdate?: OnTimeUpdate // optional — presence enables highlight capability
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
`onTimeUpdate` is optional. It's the mechanism that syncs audio playback time with word highlights via a RAF loop. If the provider doesn't have it, highlighting won't activate even if `isWordHighlightEnabled: true`.
|
|
66
|
-
|
|
67
|
-
### ChatTTSHighlightModel (ChatTTSHighlightModel.ts)
|
|
68
|
-
|
|
69
|
-
Manages highlight state using Effector stores with declarative reset. Receives `OnTimeUpdate` callback directly (not the whole `AudioProvider`).
|
|
70
|
-
|
|
71
|
-
- **`$isActive`** — gates `$highlightedWordIndex` computation. Toggled on pause/resume without resetting timepoints.
|
|
72
|
-
- **`$highlightedWordIndex`** — derived store, returns `-1` when inactive or no match. Parses mark name via `WORD_MARK_REGEX`.
|
|
73
|
-
- **`activate(timepoints, onTimeUpdate)`** — sets timepoints, enables highlighting, registers time update callback. Only triggers store updates when the highlighted word actually changes (`lastMark` comparison).
|
|
74
|
-
- **`deactivate(onTimeUpdate)`** — stops listening, resets all state via declarative `.reset()` chain.
|
|
75
|
-
- **All stores use `.reset(this.reset)`** — single `reset` event clears `$time`, `$timepoints`, and `$isActive`.
|
|
76
|
-
|
|
77
|
-
### Helpers (helpers/ttsHighlight.ts)
|
|
78
|
-
|
|
79
|
-
- **`textToSSML(text)`** — converts plain text to SSML with `<mark>` tags for word timing.
|
|
80
|
-
- **`findCurrentMark(timepoints, time)`** — iterates backwards through timepoints to find the current mark. Efficient for linear playback.
|
|
81
|
-
|
|
82
|
-
### Constants (constants.ts)
|
|
83
|
-
|
|
84
|
-
- **`WORD_MARK_REGEX`** — `/^w_(\d+)$/` — extracts word index from mark names like `w_0`, `w_1`.
|
|
85
|
-
|
|
86
|
-
### Naming conventions
|
|
87
|
-
|
|
88
|
-
| Name | Scope | Purpose |
|
|
89
|
-
|------|-------|---------|
|
|
90
|
-
| `wordHighlight` | public instance | `ChatTTSHighlightModel` instance on `ChatTTSModel` |
|
|
91
|
-
| `wordHighlightEnabled` | private field | Whether highlighting is active (set once at config) |
|
|
92
|
-
| `isWordHighlightEnabled` | public getter | Read-only access to `wordHighlightEnabled` for external consumers |
|
|
93
|
-
| `isWordHighlightEnabled` | T2SConfig field | Config flag passed to `setUpT2S()` |
|
|
94
|
-
|
|
95
|
-
## Data Flow
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
AudioProvider.onTimeUpdate(callback)
|
|
99
|
-
↓
|
|
100
|
-
ChatTTSHighlightModel.activate(timepoints, onTimeUpdate)
|
|
101
|
-
↓
|
|
102
|
-
RAF loop → audio.currentTime → findCurrentMark() → only updates when mark changes
|
|
103
|
-
↓
|
|
104
|
-
$highlightedWordIndex = parse mark name "w_N" → N (or -1 if inactive/no match)
|
|
105
|
-
↓
|
|
106
|
-
Chat.tsx: model.t2s.isWordHighlightEnabled && isPlayingMessage ? highlightedWordIndex : -1
|
|
107
|
-
↓
|
|
108
|
-
ChatMessage → MessageContent → TTSHighlightRenderer({ text, highlightedIndex })
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Key Files
|
|
112
|
-
|
|
113
|
-
| File | Purpose |
|
|
114
|
-
|------|---------|
|
|
115
|
-
| `model/ChatTTSModel.ts` | `ChatTTSModel` — TTS playback, caching, highlight orchestration |
|
|
116
|
-
| `model/ChatTTSHighlightModel.ts` | Highlight state — timepoints, current time, `$isActive`, derived word index |
|
|
117
|
-
| `helpers/ttsHighlight.ts` | `textToSSML` + `findCurrentMark` — SSML conversion and playback position lookup |
|
|
118
|
-
| `constants.ts` | `WORD_MARK_REGEX` and audio config defaults |
|
|
119
|
-
| `types/t2s.types.ts` | `AudioProvider`, `OnTimeUpdate`, `AudioStatus`, `AudioCache`, `TTSHighlightRendererProps` types |
|
|
120
|
-
| `components/Chat/Chat.tsx` | Reads `isWordHighlightEnabled` and `$highlightedWordIndex`, passes to messages |
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const escapeXml = str => str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Converts plain text to SSML with word marks for TTS highlighting.
|
|
7
|
-
* "Hello world" -> '<speak><mark name="w_0"/>Hello <mark name="w_1"/>world</speak>'
|
|
8
|
-
*/
|
|
9
|
-
export const textToSSML = text => {
|
|
10
|
-
const words = text.split(/\s+/).filter(Boolean);
|
|
11
|
-
if (words.length === 0) return '<speak></speak>';
|
|
12
|
-
const ssmlParts = words.map((word, i) => `<mark name="w_${i}"/>${escapeXml(word)}`);
|
|
13
|
-
return `<speak>${ssmlParts.join(' ')}</speak>`;
|
|
14
|
-
};
|
|
15
|
-
export const findCurrentMark = (timepoints, time) => {
|
|
16
|
-
for (let i = timepoints.length - 1; i >= 0; i--) {
|
|
17
|
-
if (timepoints[i].timeSeconds <= time) {
|
|
18
|
-
return timepoints[i].markName;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return undefined;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=ttsHighlight.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["escapeXml","str","replace","textToSSML","text","words","split","filter","Boolean","length","ssmlParts","map","word","i","join","findCurrentMark","timepoints","time","timeSeconds","markName","undefined"],"sourceRoot":"../../../../../src","sources":["features/chatbot/helpers/ttsHighlight.ts"],"mappings":";;AAEA,MAAMA,SAAS,GAAIC,GAAW,IAC5BA,GAAG,CAACC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;;AAExE;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAIC,IAAY,IAAa;EAClD,MAAMC,KAAK,GAAGD,IAAI,CAACE,KAAK,CAAC,KAAK,CAAC,CAACC,MAAM,CAACC,OAAO,CAAC;EAC/C,IAAIH,KAAK,CAACI,MAAM,KAAK,CAAC,EAAE,OAAO,iBAAiB;EAEhD,MAAMC,SAAS,GAAGL,KAAK,CAACM,GAAG,CAAC,CAACC,IAAI,EAAEC,CAAC,KAAK,iBAAiBA,CAAC,MAAMb,SAAS,CAACY,IAAI,CAAC,EAAE,CAAC;EACnF,OAAO,UAAUF,SAAS,CAACI,IAAI,CAAC,GAAG,CAAC,UAAU;AAChD,CAAC;AAED,OAAO,MAAMC,eAAe,GAAGA,CAACC,UAAuB,EAAEC,IAAY,KAAyB;EAC5F,KAAK,IAAIJ,CAAC,GAAGG,UAAU,CAACP,MAAM,GAAG,CAAC,EAAEI,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC/C,IAAIG,UAAU,CAACH,CAAC,CAAC,CAACK,WAAW,IAAID,IAAI,EAAE;MACrC,OAAOD,UAAU,CAACH,CAAC,CAAC,CAACM,QAAQ;IAC/B;EACF;EACA,OAAOC,SAAS;AAClB,CAAC","ignoreList":[]}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { restore, createEvent, combine } from 'effector';
|
|
4
|
-
import { findCurrentMark } from "../helpers/ttsHighlight.js";
|
|
5
|
-
import { WORD_MARK_REGEX } from "../constants.js";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Manages word-by-word highlight state during TTS playback.
|
|
9
|
-
* Tracks which word index should be highlighted based on audio timepoints
|
|
10
|
-
* and current playback time from the AudioProvider.
|
|
11
|
-
*/
|
|
12
|
-
export class ChatTTSHighlightModel {
|
|
13
|
-
lastMark = undefined;
|
|
14
|
-
setTimepoints = createEvent();
|
|
15
|
-
setTime = createEvent();
|
|
16
|
-
setIsActive = createEvent();
|
|
17
|
-
reset = createEvent();
|
|
18
|
-
$time = restore(this.setTime, 0).reset(this.reset);
|
|
19
|
-
$timepoints = restore(this.setTimepoints, []).reset(this.reset);
|
|
20
|
-
$isActive = restore(this.setIsActive, false).reset(this.reset);
|
|
21
|
-
$highlightedWordIndex = combine(this.$timepoints, this.$time, this.$isActive, (timepoints, time, isActive) => {
|
|
22
|
-
if (!isActive || !timepoints.length) return -1;
|
|
23
|
-
const currentMark = findCurrentMark(timepoints, time);
|
|
24
|
-
if (!currentMark) return -1;
|
|
25
|
-
const match = currentMark.match(WORD_MARK_REGEX);
|
|
26
|
-
return match ? parseInt(match[1], 10) : -1;
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Sets timepoints and starts listening to AudioProvider time updates.
|
|
31
|
-
* Only triggers store updates when the highlighted word actually changes.
|
|
32
|
-
*/
|
|
33
|
-
activate(timepoints, onTimeUpdate) {
|
|
34
|
-
this.setTimepoints(timepoints);
|
|
35
|
-
this.setIsActive(true);
|
|
36
|
-
this.lastMark = undefined;
|
|
37
|
-
onTimeUpdate(time => {
|
|
38
|
-
const currentMark = findCurrentMark(this.$timepoints.getState(), time);
|
|
39
|
-
if (!currentMark) return;
|
|
40
|
-
if (currentMark !== this.lastMark) {
|
|
41
|
-
this.lastMark = currentMark;
|
|
42
|
-
this.setTime(time);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
deactivate(onTimeUpdate) {
|
|
47
|
-
onTimeUpdate?.(null);
|
|
48
|
-
this.lastMark = undefined;
|
|
49
|
-
this.reset();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=ChatTTSHighlightModel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["restore","createEvent","combine","findCurrentMark","WORD_MARK_REGEX","ChatTTSHighlightModel","lastMark","undefined","setTimepoints","setTime","setIsActive","reset","$time","$timepoints","$isActive","$highlightedWordIndex","timepoints","time","isActive","length","currentMark","match","parseInt","activate","onTimeUpdate","getState","deactivate"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatTTSHighlightModel.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,WAAW,EAAEC,OAAO,QAAQ,UAAU;AAGxD,SAASC,eAAe,QAAQ,4BAAyB;AACzD,SAASC,eAAe,QAAQ,iBAAc;;AAE9C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,CAAC;EACzBC,QAAQ,GAAuBC,SAAS;EAEvCC,aAAa,GAAGP,WAAW,CAAc,CAAC;EAC1CQ,OAAO,GAA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,CAAC,IAAI,CAACU,WAAW,CAACY,QAAQ,CAAC,CAAC,EAAER,IAAI,CAAC;MACtE,IAAI,CAACG,WAAW,EAAE;MAElB,IAAIA,WAAW,KAAK,IAAI,CAACd,QAAQ,EAAE;QACjC,IAAI,CAACA,QAAQ,GAAGc,WAAW;QAC3B,IAAI,CAACX,OAAO,CAACQ,IAAI,CAAC;MACpB;IACF,CAAC,CAAC;EACJ;EAEAS,UAAUA,CAACF,YAAiC,EAAE;IAC5CA,YAAY,GAAG,IAAI,CAAC;IACpB,IAAI,CAAClB,QAAQ,GAAGC,SAAS;IACzB,IAAI,CAACI,KAAK,CAAC,CAAC;EACd;AACF","ignoreList":[]}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { restore, createEvent, createEffect, sample } from 'effector';
|
|
4
|
-
import { AUDIO_CONFIG, DEFAULT_VOICE } from "../constants.js";
|
|
5
|
-
import { AudioStatus } from "../types/t2s.types.js";
|
|
6
|
-
import { textToSSML } from "../helpers/ttsHighlight.js";
|
|
7
|
-
import { ChatTTSHighlightModel } from "./ChatTTSHighlightModel.js";
|
|
8
|
-
export class ChatTTSModel {
|
|
9
|
-
wordHighlight = new ChatTTSHighlightModel();
|
|
10
|
-
audioCache = new Map();
|
|
11
|
-
audioProvider = null;
|
|
12
|
-
wordHighlightEnabled = false;
|
|
13
|
-
setCurrentPlayingId = createEvent();
|
|
14
|
-
$currentPlayingId = restore(this.setCurrentPlayingId, null);
|
|
15
|
-
setStatus = createEvent();
|
|
16
|
-
$status = restore(this.setStatus, AudioStatus.STOPPED);
|
|
17
|
-
audioConfig = null;
|
|
18
|
-
textSanitizer = value => value;
|
|
19
|
-
constructor({
|
|
20
|
-
api,
|
|
21
|
-
$currentChatData,
|
|
22
|
-
$isTranslated
|
|
23
|
-
}) {
|
|
24
|
-
this.api = api;
|
|
25
|
-
this.$currentChatData = $currentChatData;
|
|
26
|
-
this.$isTranslated = $isTranslated;
|
|
27
|
-
sample({
|
|
28
|
-
clock: $isTranslated,
|
|
29
|
-
target: this.reset
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
setAudioConfig(config) {
|
|
33
|
-
this.audioConfig = config;
|
|
34
|
-
}
|
|
35
|
-
setConfig({
|
|
36
|
-
audioProvider,
|
|
37
|
-
textSanitizer,
|
|
38
|
-
isWordHighlightEnabled
|
|
39
|
-
}) {
|
|
40
|
-
if (audioProvider) this.audioProvider = audioProvider;
|
|
41
|
-
if (textSanitizer) this.textSanitizer = textSanitizer;
|
|
42
|
-
// Highlighting requires audioProvider.onTimeUpdate to sync playback time with word highlights
|
|
43
|
-
this.wordHighlightEnabled = !!isWordHighlightEnabled && !!this.audioProvider?.onTimeUpdate;
|
|
44
|
-
}
|
|
45
|
-
get isWordHighlightEnabled() {
|
|
46
|
-
return this.wordHighlightEnabled;
|
|
47
|
-
}
|
|
48
|
-
getCacheKey = (messageId, isTranslated) => {
|
|
49
|
-
return `${messageId}-${isTranslated ? 'translated' : 'original'}`;
|
|
50
|
-
};
|
|
51
|
-
async fetchAudio(text) {
|
|
52
|
-
const config = this.audioConfig;
|
|
53
|
-
const response = await this.api.textToSpeechTextFx({
|
|
54
|
-
input: this.wordHighlightEnabled ? {
|
|
55
|
-
ssml: textToSSML(text)
|
|
56
|
-
} : {
|
|
57
|
-
text
|
|
58
|
-
},
|
|
59
|
-
voice: config?.voice ?? DEFAULT_VOICE,
|
|
60
|
-
audioConfig: config?.audioConfig ?? AUDIO_CONFIG,
|
|
61
|
-
enableTimePointing: this.wordHighlightEnabled ? ['SSML_MARK'] : []
|
|
62
|
-
});
|
|
63
|
-
const audioPath = typeof response.audioContent === 'string' ? `data:audio/mpeg;base64,${response.audioContent}` : response?.audioContent ?? '';
|
|
64
|
-
return {
|
|
65
|
-
audioPath,
|
|
66
|
-
timepoints: response.timepoints ?? []
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
async play({
|
|
70
|
-
message,
|
|
71
|
-
isTranslated
|
|
72
|
-
}) {
|
|
73
|
-
if (!this.audioProvider) throw new Error('Audio provider is not set. Use setConfig.');
|
|
74
|
-
const messageText = isTranslated ? message.translatedMessage : message.message;
|
|
75
|
-
const messageId = message.id;
|
|
76
|
-
const text = this.textSanitizer(messageText);
|
|
77
|
-
try {
|
|
78
|
-
const status = this.$status.getState();
|
|
79
|
-
const playingId = this.$currentPlayingId.getState();
|
|
80
|
-
const isPlaying = status === AudioStatus.PLAYING;
|
|
81
|
-
const isPaused = status === AudioStatus.PAUSED;
|
|
82
|
-
const isCurrentMessage = messageId === playingId;
|
|
83
|
-
if (isPlaying && isCurrentMessage) {
|
|
84
|
-
this.audioProvider.pause();
|
|
85
|
-
if (this.wordHighlightEnabled) this.wordHighlight.setIsActive(false);
|
|
86
|
-
this.setStatus(AudioStatus.PAUSED);
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (isPaused && isCurrentMessage) {
|
|
90
|
-
this.audioProvider.resume();
|
|
91
|
-
if (this.wordHighlightEnabled) this.wordHighlight.setIsActive(true);
|
|
92
|
-
this.setStatus(AudioStatus.PLAYING);
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
if (messageId && !isCurrentMessage) {
|
|
96
|
-
this.audioProvider.stop();
|
|
97
|
-
this.wordHighlight.deactivate(this.audioProvider?.onTimeUpdate ?? null);
|
|
98
|
-
}
|
|
99
|
-
const cacheKey = this.getCacheKey(messageId, isTranslated);
|
|
100
|
-
this.setCurrentPlayingId(messageId);
|
|
101
|
-
const cached = this.audioCache.get(cacheKey);
|
|
102
|
-
const {
|
|
103
|
-
audioPath,
|
|
104
|
-
timepoints
|
|
105
|
-
} = cached ?? (await this.fetchAudio(text));
|
|
106
|
-
if (!cached) {
|
|
107
|
-
this.audioCache.set(cacheKey, {
|
|
108
|
-
audioPath,
|
|
109
|
-
timepoints
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
if (this.wordHighlightEnabled && this.audioProvider?.onTimeUpdate && timepoints.length > 0) {
|
|
113
|
-
this.wordHighlight.activate(timepoints, this.audioProvider.onTimeUpdate);
|
|
114
|
-
}
|
|
115
|
-
this.setStatus(AudioStatus.PLAYING);
|
|
116
|
-
await this.audioProvider.play(audioPath, () => {
|
|
117
|
-
this.onPlaybackComplete();
|
|
118
|
-
});
|
|
119
|
-
} catch (error) {
|
|
120
|
-
void this.reset();
|
|
121
|
-
console.error('Error playing text-to-speech: ', error);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
async playLatest() {
|
|
125
|
-
const lastMessage = this.$currentChatData.getState().messages.at(-1);
|
|
126
|
-
if (!lastMessage) return;
|
|
127
|
-
const isTranslated = this.$isTranslated.getState();
|
|
128
|
-
return this.play({
|
|
129
|
-
message: lastMessage,
|
|
130
|
-
isTranslated
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
onPlaybackComplete = () => {
|
|
134
|
-
this.setStatus(AudioStatus.STOPPED);
|
|
135
|
-
this.setCurrentPlayingId(null);
|
|
136
|
-
this.wordHighlight.deactivate(this.audioProvider?.onTimeUpdate ?? null);
|
|
137
|
-
};
|
|
138
|
-
stop() {
|
|
139
|
-
if (!this.audioProvider) throw new Error('Audio provider is not set. Use setAudioProvider.');
|
|
140
|
-
this.audioProvider.stop();
|
|
141
|
-
}
|
|
142
|
-
reset = createEffect(() => {
|
|
143
|
-
this.stop();
|
|
144
|
-
this.setStatus(AudioStatus.STOPPED);
|
|
145
|
-
this.setCurrentPlayingId(null);
|
|
146
|
-
this.wordHighlight.deactivate(this.audioProvider?.onTimeUpdate ?? null);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
//# sourceMappingURL=ChatTTSModel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["restore","createEvent","createEffect","sample","AUDIO_CONFIG","DEFAULT_VOICE","AudioStatus","textToSSML","ChatTTSHighlightModel","ChatTTSModel","wordHighlight","audioCache","Map","audioProvider","wordHighlightEnabled","setCurrentPlayingId","$currentPlayingId","setStatus","$status","STOPPED","audioConfig","textSanitizer","value","constructor","api","$currentChatData","$isTranslated","clock","target","reset","setAudioConfig","config","setConfig","isWordHighlightEnabled","onTimeUpdate","getCacheKey","messageId","isTranslated","fetchAudio","text","response","textToSpeechTextFx","input","ssml","voice","enableTimePointing","audioPath","audioContent","timepoints","play","message","Error","messageText","translatedMessage","id","status","getState","playingId","isPlaying","PLAYING","isPaused","PAUSED","isCurrentMessage","pause","setIsActive","resume","stop","deactivate","cacheKey","cached","get","set","length","activate","onPlaybackComplete","error","console","playLatest","lastMessage","messages","at"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatTTSModel.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,WAAW,EAAEC,YAAY,EAAEC,MAAM,QAAe,UAAU;AAC5E,SAASC,YAAY,EAAEC,aAAa,QAAQ,iBAAc;AAC1D,SAIEC,WAAW,QAGN,uBAAoB;AAG3B,SAASC,UAAU,QAAQ,4BAAyB;AAEpD,SAASC,qBAAqB,QAAQ,4BAAyB;AAQ/D,OAAO,MAAMC,YAAY,CAAC;EAERC,aAAa,GAAG,IAAIF,qBAAqB,CAAC,CAAC;EAC1CG,UAAU,GAAG,IAAIC,GAAG,CAAqB,CAAC;EAGnDC,aAAa,GAAyB,IAAI;EAC1CC,oBAAoB,GAAG,KAAK;EAE3BC,mBAAmB,GAAGd,WAAW,CAAgB,CAAC;EAClDe,iBAAiB,GAAGhB,OAAO,CAAC,IAAI,CAACe,mBAAmB,EAAE,IAAI,CAAC;EAC3DE,SAAS,GAAGhB,WAAW,CAAc,CAAC;EACtCiB,OAAO,GAAGlB,OAAO,CAAC,IAAI,CAACiB,SAAS,EAAEX,WAAW,CAACa,OAAO,CAAC;EAEvDC,WAAW,GAAuB,IAAI;EACtCC,aAAa,GAAIC,KAAa,IAAKA,KAAK;EAEhDC,WAAWA,CAAC;IAAEC,GAAG;IAAEC,gBAAgB;IAAEC;EAA0C,CAAC,EAA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AACyD,UAAU,CAAC,IAAI,CAACtD,aAAa,EAAEqB,YAAY,IAAI,IAAI,CAAC;EACzE,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { View, StyleSheet, Text } from 'react-native';
|
|
5
|
-
import { SPACING, BORDER_RADIUS, COLORS } from '@magmamath/react-native-ui';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export const OpenEndedAttemptsLimit = ({
|
|
8
|
-
text
|
|
9
|
-
}) => /*#__PURE__*/_jsx(View, {
|
|
10
|
-
style: styles.container,
|
|
11
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
12
|
-
style: styles.text,
|
|
13
|
-
children: text
|
|
14
|
-
})
|
|
15
|
-
});
|
|
16
|
-
const styles = StyleSheet.create({
|
|
17
|
-
container: {
|
|
18
|
-
paddingVertical: SPACING[50],
|
|
19
|
-
paddingHorizontal: SPACING[200],
|
|
20
|
-
borderRadius: BORDER_RADIUS[300],
|
|
21
|
-
backgroundColor: COLORS.PRIMARY_RED
|
|
22
|
-
},
|
|
23
|
-
text: {
|
|
24
|
-
fontSize: 14,
|
|
25
|
-
color: COLORS.NEUTRAL_1
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=OpenEndedAttemptsLimit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","Text","SPACING","BORDER_RADIUS","COLORS","jsx","_jsx","OpenEndedAttemptsLimit","text","style","styles","container","children","create","paddingVertical","paddingHorizontal","borderRadius","backgroundColor","PRIMARY_RED","fontSize","color","NEUTRAL_1"],"sourceRoot":"../../../../../src","sources":["features/openEnded/components/OpenEndedAttemptsLimit.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,OAAO,EAAEC,aAAa,EAAEC,MAAM,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAM3E,OAAO,MAAMC,sBAAsB,GAAGA,CAAC;EAAEC;AAA2B,CAAC,kBACnEF,IAAA,CAACP,IAAI;EAACU,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAAC,QAAA,eAC5BN,IAAA,CAACL,IAAI;IAACQ,KAAK,EAAEC,MAAM,CAACF,IAAK;IAAAI,QAAA,EAAEJ;EAAI,CAAO;AAAC,CACnC,CACP;AAED,MAAME,MAAM,GAAGV,UAAU,CAACa,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,eAAe,EAAEZ,OAAO,CAAC,EAAE,CAAC;IAC5Ba,iBAAiB,EAAEb,OAAO,CAAC,GAAG,CAAC;IAC/Bc,YAAY,EAAEb,aAAa,CAAC,GAAG,CAAC;IAChCc,eAAe,EAAEb,MAAM,CAACc;EAC1B,CAAC;EACDV,IAAI,EAAE;IACJW,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAEhB,MAAM,CAACiB;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { View, StyleSheet } from 'react-native';
|
|
5
|
-
import { Typography, HeadingVariants, SPACING, BORDER_RADIUS, COLORS } from '@magmamath/react-native-ui';
|
|
6
|
-
import { getScoreLabelColor } from "../oe.helpers.js";
|
|
7
|
-
import { isWeb } from "../../../shared/common.constants.js";
|
|
8
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
const SCORE_WIDTH = {
|
|
10
|
-
DEFAULT: isWeb ? 20 : 26,
|
|
11
|
-
LARGE: isWeb ? 26 : 30
|
|
12
|
-
};
|
|
13
|
-
export const OpenEndedScoreLabel = ({
|
|
14
|
-
label,
|
|
15
|
-
score,
|
|
16
|
-
maxScore,
|
|
17
|
-
disabled,
|
|
18
|
-
variant
|
|
19
|
-
}) => {
|
|
20
|
-
const colors = getScoreLabelColor({
|
|
21
|
-
variant,
|
|
22
|
-
disabled
|
|
23
|
-
});
|
|
24
|
-
const scoreContainerWidth = score !== null && score >= 10 ? SCORE_WIDTH.LARGE : SCORE_WIDTH.DEFAULT;
|
|
25
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
26
|
-
style: styles.container,
|
|
27
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
28
|
-
style: [styles.score, {
|
|
29
|
-
width: scoreContainerWidth
|
|
30
|
-
}],
|
|
31
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
|
32
|
-
variant: HeadingVariants.H3,
|
|
33
|
-
style: [styles.scoreText, {
|
|
34
|
-
color: colors.score
|
|
35
|
-
}],
|
|
36
|
-
children: score
|
|
37
|
-
})
|
|
38
|
-
}), /*#__PURE__*/_jsxs(Typography, {
|
|
39
|
-
variant: HeadingVariants.H3,
|
|
40
|
-
style: [styles.maxScoreText, {
|
|
41
|
-
color: colors.maxScore
|
|
42
|
-
}],
|
|
43
|
-
children: ["/ ", maxScore, " ", label]
|
|
44
|
-
})]
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
const styles = StyleSheet.create({
|
|
48
|
-
container: {
|
|
49
|
-
alignItems: 'center',
|
|
50
|
-
flexDirection: 'row'
|
|
51
|
-
},
|
|
52
|
-
score: {
|
|
53
|
-
flexDirection: 'row',
|
|
54
|
-
alignItems: 'center',
|
|
55
|
-
justifyContent: 'center',
|
|
56
|
-
height: 32,
|
|
57
|
-
borderWidth: 1,
|
|
58
|
-
borderRadius: BORDER_RADIUS[200],
|
|
59
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
60
|
-
paddingVertical: isWeb ? SPACING[50] : 0,
|
|
61
|
-
paddingHorizontal: SPACING[100],
|
|
62
|
-
backgroundColor: COLORS.NEUTRAL_1
|
|
63
|
-
},
|
|
64
|
-
scoreText: {
|
|
65
|
-
textAlign: 'center'
|
|
66
|
-
},
|
|
67
|
-
maxScoreText: {
|
|
68
|
-
marginLeft: SPACING[200]
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
//# sourceMappingURL=OpenEndedScoreLabel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","Typography","HeadingVariants","SPACING","BORDER_RADIUS","COLORS","getScoreLabelColor","isWeb","jsx","_jsx","jsxs","_jsxs","SCORE_WIDTH","DEFAULT","LARGE","OpenEndedScoreLabel","label","score","maxScore","disabled","variant","colors","scoreContainerWidth","style","styles","container","children","width","H3","scoreText","color","maxScoreText","create","alignItems","flexDirection","justifyContent","height","borderWidth","borderRadius","borderColor","NEUTRAL_5","paddingVertical","paddingHorizontal","backgroundColor","NEUTRAL_1","textAlign","marginLeft"],"sourceRoot":"../../../../../src","sources":["features/openEnded/components/OpenEndedScoreLabel.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SACEC,UAAU,EACVC,eAAe,EACfC,OAAO,EACPC,aAAa,EACbC,MAAM,QACD,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kBAAe;AAElD,SAASC,KAAK,QAAQ,qCAAkC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUxD,MAAMC,WAAW,GAAG;EAClBC,OAAO,EAAEN,KAAK,GAAG,EAAE,GAAG,EAAE;EACxBO,KAAK,EAAEP,KAAK,GAAG,EAAE,GAAG;AACtB,CAAU;AAEV,OAAO,MAAMQ,mBAAmB,GAAGA,CAAC;EAClCC,KAAK;EACLC,KAAK;EACLC,QAAQ;EACRC,QAAQ;EACRC;AACwB,CAAC,KAAK;EAC9B,MAAMC,MAAM,GAAGf,kBAAkB,CAAC;IAAEc,OAAO;IAAED;EAAS,CAAC,CAAC;EACxD,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C,EAAE,CAAC,GAAG,CAAC;IACxCuC,iBAAiB,EAAEvC,OAAO,CAAC,GAAG,CAAC;IAC/BwC,eAAe,EAAEtC,MAAM,CAACuC;EAC1B,CAAC;EACDf,SAAS,EAAE;IACTgB,SAAS,EAAE;EACb,CAAC;EACDd,YAAY,EAAE;IACZe,UAAU,EAAE3C,OAAO,CAAC,GAAG;EACzB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
export * from "./oe.helpers.js";
|
|
4
|
-
export * from "./oe.types.js";
|
|
5
|
-
export { OpenEndedScoreLabel } from "./components/OpenEndedScoreLabel.js";
|
|
6
|
-
export { OpenEndedAttemptsLimit } from "./components/OpenEndedAttemptsLimit.js";
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenEndedScoreLabel","OpenEndedAttemptsLimit"],"sourceRoot":"../../../../src","sources":["features/openEnded/index.ts"],"mappings":";;AAAA,cAAc,iBAAc;AAC5B,cAAc,eAAY;AAC1B,SAASA,mBAAmB,QAAQ,qCAAkC;AACtE,SAASC,sBAAsB,QAAQ,wCAAqC","ignoreList":[]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { COLORS } from '@magmamath/react-native-ui';
|
|
4
|
-
import { OpenEndedScoreLabelVariant } from "./oe.types.js";
|
|
5
|
-
const scoreVariantToColor = variant => {
|
|
6
|
-
const colors = {
|
|
7
|
-
[OpenEndedScoreLabelVariant.CORRECT]: COLORS.PRIMARY_YELLOW,
|
|
8
|
-
[OpenEndedScoreLabelVariant.FIRST_ATTEMPT]: COLORS.PRIMARY_GREEN,
|
|
9
|
-
[OpenEndedScoreLabelVariant.WRONG]: COLORS.PRIMARY_RED,
|
|
10
|
-
[OpenEndedScoreLabelVariant.DEFAULT]: COLORS.PRIMARY_BLUE
|
|
11
|
-
};
|
|
12
|
-
return colors[variant] ?? COLORS.PRIMARY_BLUE;
|
|
13
|
-
};
|
|
14
|
-
export const getScoreLabelColor = ({
|
|
15
|
-
variant,
|
|
16
|
-
disabled
|
|
17
|
-
}) => ({
|
|
18
|
-
score: disabled ? COLORS.NEUTRAL_6 : COLORS.NEUTRAL_9,
|
|
19
|
-
maxScore: disabled ? COLORS.NEUTRAL_6 : scoreVariantToColor(variant)
|
|
20
|
-
});
|
|
21
|
-
//# sourceMappingURL=oe.helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["COLORS","OpenEndedScoreLabelVariant","scoreVariantToColor","variant","colors","CORRECT","PRIMARY_YELLOW","FIRST_ATTEMPT","PRIMARY_GREEN","WRONG","PRIMARY_RED","DEFAULT","PRIMARY_BLUE","getScoreLabelColor","disabled","score","NEUTRAL_6","NEUTRAL_9","maxScore"],"sourceRoot":"../../../../src","sources":["features/openEnded/oe.helpers.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,4BAA4B;AAEnD,SAASC,0BAA0B,QAAQ,eAAY;AAYvD,MAAMC,mBAAmB,GAAIC,OAAmC,IAAiB;EAC/E,MAAMC,MAAsD,GAAG;IAC7D,CAACH,0BAA0B,CAACI,OAAO,GAAGL,MAAM,CAACM,cAAc;IAC3D,CAACL,0BAA0B,CAACM,aAAa,GAAGP,MAAM,CAACQ,aAAa;IAChE,CAACP,0BAA0B,CAACQ,KAAK,GAAGT,MAAM,CAACU,WAAW;IACtD,CAACT,0BAA0B,CAACU,OAAO,GAAGX,MAAM,CAACY;EAC/C,CAAC;EACD,OAAOR,MAAM,CAACD,OAAO,CAAC,IAAIH,MAAM,CAACY,YAAY;AAC/C,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCV,OAAO;EACPW;AACuB,CAAC,MAAwB;EAChDC,KAAK,EAAED,QAAQ,GAAGd,MAAM,CAACgB,SAAS,GAAGhB,MAAM,CAACiB,SAAS;EACrDC,QAAQ,EAAEJ,QAAQ,GAAGd,MAAM,CAACgB,SAAS,GAAGd,mBAAmB,CAACC,OAAO;AACrE,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
export let OpenEndedScoreLabelVariant = /*#__PURE__*/function (OpenEndedScoreLabelVariant) {
|
|
4
|
-
OpenEndedScoreLabelVariant["CORRECT"] = "CORRECT";
|
|
5
|
-
OpenEndedScoreLabelVariant["FIRST_ATTEMPT"] = "FIRST_ATTEMPT";
|
|
6
|
-
OpenEndedScoreLabelVariant["WRONG"] = "WRONG";
|
|
7
|
-
OpenEndedScoreLabelVariant["DEFAULT"] = "DEFAULT";
|
|
8
|
-
return OpenEndedScoreLabelVariant;
|
|
9
|
-
}({});
|
|
10
|
-
//# sourceMappingURL=oe.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenEndedScoreLabelVariant"],"sourceRoot":"../../../../src","sources":["features/openEnded/oe.types.ts"],"mappings":";;AAAA,WAAYA,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA","ignoreList":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export const ConditionalWrapper = ({
|
|
6
|
-
withWrapper,
|
|
7
|
-
Wrapper,
|
|
8
|
-
children
|
|
9
|
-
}) => {
|
|
10
|
-
if (withWrapper && Wrapper) {
|
|
11
|
-
return /*#__PURE__*/_jsx(Wrapper, {
|
|
12
|
-
children: children
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
return children;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=ConditionalWrapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","jsx","_jsx","ConditionalWrapper","withWrapper","Wrapper","children"],"sourceRoot":"../../../../src","sources":["lib/components/ConditionalWrapper.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAuD,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAQ1E,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAAEC,WAAW;EAAEC,OAAO;EAAEC;AAAkC,CAAC,KAAK;EACjG,IAAIF,WAAW,IAAIC,OAAO,EAAE;IAC1B,oBAAOH,IAAA,CAACG,OAAO;MAAAC,QAAA,EAAEA;IAAQ,CAAU,CAAC;EACtC;EAEA,OAAOA,QAAQ;AACjB,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","isWeb","OS"],"sourceRoot":"../../../src","sources":["shared/common.constants.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,MAAMC,KAAK,GAAGD,QAAQ,CAACE,EAAE,KAAK,KAAK","ignoreList":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { COLORS } from '@magmamath/react-native-ui';
|
|
4
|
-
import Svg, { Path } from 'react-native-svg';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
export const TimeIcon = ({
|
|
8
|
-
size = 20,
|
|
9
|
-
color = COLORS.NEUTRAL_9
|
|
10
|
-
}) => {
|
|
11
|
-
return /*#__PURE__*/_jsxs(Svg, {
|
|
12
|
-
width: size,
|
|
13
|
-
height: size,
|
|
14
|
-
viewBox: "0 0 17 17",
|
|
15
|
-
fill: "none",
|
|
16
|
-
children: [/*#__PURE__*/_jsx(Path, {
|
|
17
|
-
fillRule: "evenodd",
|
|
18
|
-
clipRule: "evenodd",
|
|
19
|
-
d: "M7.84 1.5C4.33851 1.5 1.5 4.33851 1.5 7.84C1.5 11.3415 4.33851 14.18 7.84 14.18C11.3415 14.18 14.18 11.3415 14.18 7.84C14.18 4.33851 11.3415 1.5 7.84 1.5ZM0 7.84C0 3.51009 3.51009 0 7.84 0C12.1699 0 15.68 3.51009 15.68 7.84C15.68 12.1699 12.1699 15.68 7.84 15.68C3.51009 15.68 0 12.1699 0 7.84Z",
|
|
20
|
-
fill: color
|
|
21
|
-
}), /*#__PURE__*/_jsx(Path, {
|
|
22
|
-
fillRule: "evenodd",
|
|
23
|
-
clipRule: "evenodd",
|
|
24
|
-
d: "M7.83999 3.0826C8.2542 3.0826 8.58999 3.41839 8.58999 3.8326V7.8033L10.4859 9.42838C10.8004 9.69794 10.8368 10.1714 10.5673 10.4859C10.2977 10.8004 9.82421 10.8368 9.50972 10.5673L7.57539 8.90926C7.2673 8.64519 7.08999 8.25967 7.08999 7.85389V3.8326C7.08999 3.41839 7.42578 3.0826 7.83999 3.0826Z",
|
|
25
|
-
fill: color
|
|
26
|
-
})]
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=TimeIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["COLORS","Svg","Path","React","jsx","_jsx","jsxs","_jsxs","TimeIcon","size","color","NEUTRAL_9","width","height","viewBox","fill","children","fillRule","clipRule","d"],"sourceRoot":"../../../../src","sources":["shared/icons/TimeIcon.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,4BAA4B;AAEnD,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAC5C,OAAOC,KAAK,MAAM,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEzB,OAAO,MAAMC,QAAQ,GAAGA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC,KAAK,GAAGV,MAAM,CAACW;AAAqB,CAAC,KAAK;EAC9E,oBACEJ,KAAA,CAACN,GAAG;IAACW,KAAK,EAAEH,IAAK;IAACI,MAAM,EAAEJ,IAAK;IAACK,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAAAC,QAAA,gBAC7DX,IAAA,CAACH,IAAI;MACHe,QAAQ,EAAC,SAAS;MAClBC,QAAQ,EAAC,SAAS;MAClBC,CAAC,EAAC,wSAAwS;MAC1SJ,IAAI,EAAEL;IAAM,CACb,CAAC,eACFL,IAAA,CAACH,IAAI;MACHe,QAAQ,EAAC,SAAS;MAClBC,QAAQ,EAAC,SAAS;MAClBC,CAAC,EAAC,0SAA0S;MAC5SJ,IAAI,EAAEL;IAAM,CACb,CAAC;EAAA,CACC,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import Svg, { Path } from 'react-native-svg';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
const ASPECT_RATIO = 5 / 14;
|
|
7
|
-
export const RoundBracketLeftIcon = ({
|
|
8
|
-
size = 20,
|
|
9
|
-
color
|
|
10
|
-
}) => {
|
|
11
|
-
return /*#__PURE__*/_jsx(Svg, {
|
|
12
|
-
width: size * ASPECT_RATIO,
|
|
13
|
-
height: size,
|
|
14
|
-
viewBox: "0 0 5 14",
|
|
15
|
-
fill: "none",
|
|
16
|
-
children: /*#__PURE__*/_jsx(Path, {
|
|
17
|
-
fillRule: "evenodd",
|
|
18
|
-
clipRule: "evenodd",
|
|
19
|
-
d: "M3.90533 0.21967C4.19823 0.512563 4.19823 0.987437 3.90533 1.28033C0.67361 4.51206 0.736927 10.001 3.8631 12.6806C4.17759 12.9501 4.21401 13.4236 3.94445 13.7381C3.67488 14.0526 3.20141 14.089 2.88691 13.8194C-0.986916 10.499 -0.923598 3.98794 2.84467 0.21967C3.13757 -0.0732233 3.61244 -0.0732233 3.90533 0.21967Z",
|
|
20
|
-
fill: color
|
|
21
|
-
})
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=RoundBracketLeftIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Svg","Path","jsx","_jsx","ASPECT_RATIO","RoundBracketLeftIcon","size","color","width","height","viewBox","fill","children","fillRule","clipRule","d"],"sourceRoot":"../../../../../../src","sources":["shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,GAAG,IAAIC,IAAI,QAAQ,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE5C,MAAMC,YAAY,GAAG,CAAC,GAAG,EAAE;AAE3B,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC;AAAiB,CAAC,KAAK;EACvE,oBACEJ,IAAA,CAACH,GAAG;IAACQ,KAAK,EAAEF,IAAI,GAAGF,YAAa;IAACK,MAAM,EAAEH,IAAK;IAACI,OAAO,EAAC,UAAU;IAACC,IAAI,EAAC,MAAM;IAAAC,QAAA,eAC3ET,IAAA,CAACF,IAAI;MACHY,QAAQ,EAAC,SAAS;MAClBC,QAAQ,EAAC,SAAS;MAClBC,CAAC,EAAC,4TAA4T;MAC9TJ,IAAI,EAAEJ;IAAM,CACb;EAAC,CACC,CAAC;AAEV,CAAC","ignoreList":[]}
|