@magmamath/students-features 0.10.0-rc.6 → 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,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MATH_AREA_UNITS,
|
|
3
3
|
MATH_LENGTH_UNITS,
|
|
4
|
-
MATH_TIME_UNITS,
|
|
5
4
|
MATH_VOLUME_UNITS,
|
|
6
5
|
MATH_WEIGHT_UNITS,
|
|
7
6
|
} from '../../types/MathKeysGroups/units'
|
|
@@ -11,7 +10,6 @@ import { VolumeIcon } from '../../../../shared/icons/VolumeIcon'
|
|
|
11
10
|
import { WeightIcon } from '../../../../shared/icons/WeightIcon'
|
|
12
11
|
import { KeyboardUnitsGroupType, UnitKeyboardGroups } from './types'
|
|
13
12
|
import { MathEntryKeyboardGroupId } from '../../types/keyboardGroupIds'
|
|
14
|
-
import { TimeIcon } from '../../../../shared/icons/TimeIcon'
|
|
15
13
|
|
|
16
14
|
export const MATH_ENTRY_LENGTH_UNITS_SW_KEYBOARD_GROUPS: UnitKeyboardGroups = {
|
|
17
15
|
id: MathEntryKeyboardGroupId.LENGTH_UNITS_SW,
|
|
@@ -173,11 +171,6 @@ export const MATH_ENTRY_WEIGHT_UNITS_SW_KEYBOARD_GROUPS: UnitKeyboardGroups = {
|
|
|
173
171
|
],
|
|
174
172
|
}
|
|
175
173
|
|
|
176
|
-
export const MATH_ENTRY_TIME_UNITS_SW_KEYBOARD_GROUPS: UnitKeyboardGroups = {
|
|
177
|
-
id: MathEntryKeyboardGroupId.TIME_SW,
|
|
178
|
-
keys: [[MATH_TIME_UNITS.S, MATH_TIME_UNITS.M, MATH_TIME_UNITS.H]],
|
|
179
|
-
}
|
|
180
|
-
|
|
181
174
|
export const MATH_ENTRY_WEIGHT_UNITS_US_KEYBOARD_GROUPS: UnitKeyboardGroups = {
|
|
182
175
|
id: MathEntryKeyboardGroupId.WEIGHT_UNITS_US,
|
|
183
176
|
keys: [
|
|
@@ -206,8 +199,4 @@ export const UNITS_KEYBOARD_GROUPS = new Map([
|
|
|
206
199
|
KeyboardUnitsGroupType.WEIGHT,
|
|
207
200
|
{ keys: MATH_ENTRY_WEIGHT_UNITS_SW_KEYBOARD_GROUPS.keys, icon: WeightIcon },
|
|
208
201
|
],
|
|
209
|
-
[
|
|
210
|
-
KeyboardUnitsGroupType.TIME,
|
|
211
|
-
{ keys: MATH_ENTRY_TIME_UNITS_SW_KEYBOARD_GROUPS.keys, icon: TimeIcon },
|
|
212
|
-
],
|
|
213
202
|
])
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { KeyboardGroup, KeyboardKey } from '@magmamath/students-features'
|
|
2
|
-
import { TabOptionProps } from '@magmamath/react-native-ui'
|
|
3
2
|
|
|
4
3
|
export enum SelectedLayout {
|
|
5
4
|
ALGEBRA = 'algebra',
|
|
@@ -11,14 +10,8 @@ export enum KeyboardUnitsGroupType {
|
|
|
11
10
|
AREA = 'area',
|
|
12
11
|
VOLUME = 'volume',
|
|
13
12
|
WEIGHT = 'weight',
|
|
14
|
-
TIME = 'time',
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
export type UnitKeyboardGroups = {
|
|
18
16
|
keys: KeyboardKey[][]
|
|
19
17
|
} & Omit<KeyboardGroup, 'keys'>
|
|
20
|
-
|
|
21
|
-
export type UnitTab = Omit<TabOptionProps, 'key'> & {
|
|
22
|
-
key: KeyboardUnitsGroupType
|
|
23
|
-
minBreakpoint?: number
|
|
24
|
-
}
|
|
@@ -31,7 +31,6 @@ import {
|
|
|
31
31
|
MATH_ENTRY_AREA_UNITS_US_KEYBOARD_GROUPS,
|
|
32
32
|
MATH_ENTRY_LENGTH_UNITS_SW_KEYBOARD_GROUPS,
|
|
33
33
|
MATH_ENTRY_LENGTH_UNITS_US_KEYBOARD_GROUPS,
|
|
34
|
-
MATH_ENTRY_TIME_UNITS_SW_KEYBOARD_GROUPS,
|
|
35
34
|
MATH_ENTRY_VOLUME_UNITS_SW_KEYBOARD_GROUPS,
|
|
36
35
|
MATH_ENTRY_VOLUME_UNITS_UK_KEYBOARD_GROUPS,
|
|
37
36
|
MATH_ENTRY_VOLUME_UNITS_US_KEYBOARD_GROUPS,
|
|
@@ -71,7 +70,6 @@ function createKeyboardUnitsLocale(
|
|
|
71
70
|
[KeyboardUnitsGroupType.AREA]: MATH_ENTRY_AREA_UNITS_US_KEYBOARD_GROUPS,
|
|
72
71
|
[KeyboardUnitsGroupType.VOLUME]: MATH_ENTRY_VOLUME_UNITS_US_KEYBOARD_GROUPS,
|
|
73
72
|
[KeyboardUnitsGroupType.WEIGHT]: MATH_ENTRY_WEIGHT_UNITS_US_KEYBOARD_GROUPS,
|
|
74
|
-
[KeyboardUnitsGroupType.TIME]: MATH_ENTRY_TIME_UNITS_SW_KEYBOARD_GROUPS,
|
|
75
73
|
}
|
|
76
74
|
return { ...base, ...overrides }
|
|
77
75
|
}
|
|
@@ -7,7 +7,6 @@ import { CurrencyBasicLayout } from '../components/BasicLayout/CurrencyBasicLayo
|
|
|
7
7
|
import { UnitsLayout } from '../components/UnitsLayout/UnitsLayout'
|
|
8
8
|
import { BasicPlusPlusLayout } from '../components/BasicPlusPlusLayout/BasicPlusPlusLayout'
|
|
9
9
|
import { MyScriptMathCharacterTypes } from '../../../types/characterTypes'
|
|
10
|
-
import { MOBILE_LAYOUT_WIDTH } from './constants'
|
|
11
10
|
|
|
12
11
|
export const KEYBOARD_LAYOUTS = {
|
|
13
12
|
[KeyboardType.AlgebraAdvanced]: {
|
|
@@ -19,12 +18,10 @@ export const KEYBOARD_LAYOUTS = {
|
|
|
19
18
|
MyScriptMathCharacterTypes.ALGEBRA_GREEK,
|
|
20
19
|
MyScriptMathCharacterTypes.GENERAL_MATH,
|
|
21
20
|
],
|
|
22
|
-
mobileBreakpoint: 1300,
|
|
23
21
|
},
|
|
24
22
|
[KeyboardType.Basic]: {
|
|
25
23
|
Component: BasicLayout,
|
|
26
24
|
characterTypes: [MyScriptMathCharacterTypes.NUMBERS_WHOLE],
|
|
27
|
-
mobileBreakpoint: 990,
|
|
28
25
|
},
|
|
29
26
|
[KeyboardType.BasicPlus]: {
|
|
30
27
|
Component: BasicPlusLayout,
|
|
@@ -35,7 +32,6 @@ export const KEYBOARD_LAYOUTS = {
|
|
|
35
32
|
MyScriptMathCharacterTypes.NUMBERS_AND_MULTIPLICATION,
|
|
36
33
|
MyScriptMathCharacterTypes.OPERATORS,
|
|
37
34
|
MyScriptMathCharacterTypes.PERCENT,
|
|
38
|
-
MyScriptMathCharacterTypes.NUMBERS_RATIONAL,
|
|
39
35
|
],
|
|
40
36
|
},
|
|
41
37
|
[KeyboardType.BasicTime]: {
|
|
@@ -58,8 +54,8 @@ export const KEYBOARD_LAYOUTS = {
|
|
|
58
54
|
characterTypes: [
|
|
59
55
|
MyScriptMathCharacterTypes.GEOM_ANGLES,
|
|
60
56
|
MyScriptMathCharacterTypes.GEOM_COORDINATE,
|
|
57
|
+
MyScriptMathCharacterTypes.NUMBERS_RATIONAL,
|
|
61
58
|
],
|
|
62
|
-
mobileBreakpoint: 1220,
|
|
63
59
|
},
|
|
64
60
|
}
|
|
65
61
|
|
|
@@ -76,19 +72,6 @@ export function getLayoutByCharType(charType?: number) {
|
|
|
76
72
|
return AlgebraLayout
|
|
77
73
|
}
|
|
78
74
|
|
|
79
|
-
export function getMobileBreakpointByCharType(charType?: number) {
|
|
80
|
-
if (!charType) {
|
|
81
|
-
return KEYBOARD_LAYOUTS[KeyboardType.AlgebraAdvanced].mobileBreakpoint
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
for (const layout of Object.values(KEYBOARD_LAYOUTS)) {
|
|
85
|
-
if (layout.characterTypes.includes(charType)) {
|
|
86
|
-
return 'mobileBreakpoint' in layout ? layout.mobileBreakpoint : MOBILE_LAYOUT_WIDTH
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return KEYBOARD_LAYOUTS[KeyboardType.AlgebraAdvanced].mobileBreakpoint
|
|
90
|
-
}
|
|
91
|
-
|
|
92
75
|
export function isBasicPlusPlusLayout(charType?: number) {
|
|
93
76
|
if (!charType) {
|
|
94
77
|
return true
|
|
@@ -3,7 +3,6 @@ import { KeyboardGroup, KeyboardType } from './types/types'
|
|
|
3
3
|
import { Locale } from '../../shared/translation/types'
|
|
4
4
|
import { MATH_ENTRY_ALGEBRA_KEYBOARD_GROUP } from './components/AlgebraLayout/keyboardGroups'
|
|
5
5
|
import { IS_WEB } from '@magmamath/react-native-ui'
|
|
6
|
-
import { getMobileBreakpointByCharType } from './constants/keyboardLayouts'
|
|
7
6
|
|
|
8
7
|
export function getKeyboardGroup(locale: Locale, type: KeyboardType): KeyboardGroup {
|
|
9
8
|
return KEYBOARD_GROUPS_BY_LOCALE[locale]?.[type] ?? MATH_ENTRY_ALGEBRA_KEYBOARD_GROUP
|
|
@@ -17,8 +16,3 @@ export const getIsIpadOrIphoneDevice = () => {
|
|
|
17
16
|
const isIpadOS = navigator?.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform)
|
|
18
17
|
return isIOS || isIpadOS
|
|
19
18
|
}
|
|
20
|
-
|
|
21
|
-
export const isMobileWidth = (width: number, characterType?: number) => {
|
|
22
|
-
const layoutWidth = getMobileBreakpointByCharType(characterType)
|
|
23
|
-
return width <= layoutWidth
|
|
24
|
-
}
|
|
@@ -42,8 +42,6 @@ import { EqualsIcon } from '../../../../shared/icons/keyboard/EqualsIcon/EqualsI
|
|
|
42
42
|
import { AbsoluteValueIcon } from '../../../../shared/icons/keyboard/AbsoluteValueIcon/AbsoluteValueIcon'
|
|
43
43
|
import { IntervalIcon } from '../../../../shared/icons/keyboard/IntervalIcon/IntervalIcon'
|
|
44
44
|
import { createMathKeysGroup } from './helpers'
|
|
45
|
-
import { RoundBracketLeftIcon } from '../../../../shared/icons/keyboard/RoundBracketLeftIcon/RoundBracketLeftIcon'
|
|
46
|
-
import { RoundBracketRightIcon } from '../../../../shared/icons/keyboard/RoundBracketRightIcon/RoundBracketRightIcon'
|
|
47
45
|
|
|
48
46
|
export const MATH_BASIC_OPERATORS = createMathKeysGroup({
|
|
49
47
|
ADDITION: {
|
|
@@ -112,7 +110,7 @@ export const MATH_BASIC_OPERATORS = createMathKeysGroup({
|
|
|
112
110
|
},
|
|
113
111
|
COMMA: {
|
|
114
112
|
icon: <CommaIcon {...DEFAULT_KEY_ICON_PROPS} size={22} />,
|
|
115
|
-
mathliveValue: '
|
|
113
|
+
mathliveValue: ',',
|
|
116
114
|
katexValue: ',',
|
|
117
115
|
},
|
|
118
116
|
COLON: {
|
|
@@ -121,7 +119,7 @@ export const MATH_BASIC_OPERATORS = createMathKeysGroup({
|
|
|
121
119
|
katexValue: ':',
|
|
122
120
|
},
|
|
123
121
|
C_DOT: {
|
|
124
|
-
icon: <CDotIcon {...DEFAULT_KEY_ICON_PROPS}
|
|
122
|
+
icon: <CDotIcon {...DEFAULT_KEY_ICON_PROPS} />,
|
|
125
123
|
mathliveValue: '\\cdot',
|
|
126
124
|
katexValue: '⋅',
|
|
127
125
|
},
|
|
@@ -253,16 +251,6 @@ export const MATH_BASIC_OPERATORS = createMathKeysGroup({
|
|
|
253
251
|
mathliveValue: '$\\left(#@\\right)$',
|
|
254
252
|
katexValue: '( )',
|
|
255
253
|
},
|
|
256
|
-
ROUND_BRACKET_RIGHT: {
|
|
257
|
-
icon: <RoundBracketRightIcon {...DEFAULT_KEY_ICON_PROPS} />,
|
|
258
|
-
mathliveValue: ')',
|
|
259
|
-
katexValue: ')',
|
|
260
|
-
},
|
|
261
|
-
ROUND_BRACKET_LEFT: {
|
|
262
|
-
icon: <RoundBracketLeftIcon {...DEFAULT_KEY_ICON_PROPS} />,
|
|
263
|
-
mathliveValue: '(',
|
|
264
|
-
katexValue: '(',
|
|
265
|
-
},
|
|
266
254
|
ORDERED_PAIR: {
|
|
267
255
|
icon: <OrderedPairIcon {...DEFAULT_KEY_ICON_PROPS} size={20} extraColor={COLORS.NEUTRAL_6} />,
|
|
268
256
|
mathliveValue: '$\\left(\\placeholder{},\\placeholder{}\\right)$',
|
|
@@ -275,7 +263,7 @@ export const MATH_BASIC_OPERATORS = createMathKeysGroup({
|
|
|
275
263
|
},
|
|
276
264
|
INTERVAL: {
|
|
277
265
|
icon: <IntervalIcon {...DEFAULT_KEY_ICON_PROPS} />,
|
|
278
|
-
mathliveValue: '$\\left[\\
|
|
266
|
+
mathliveValue: '$\\left[, \\right]$',
|
|
279
267
|
katexValue: '[ , ]',
|
|
280
268
|
},
|
|
281
269
|
})
|
|
@@ -427,19 +427,16 @@ export const MATH_TIME_UNITS = createMathKeysGroup({
|
|
|
427
427
|
label: 's',
|
|
428
428
|
mathliveValue: '\\mathrm{s}',
|
|
429
429
|
katexValue: 's',
|
|
430
|
-
style: STYLE_PRESETS.LARGE,
|
|
431
430
|
},
|
|
432
431
|
M: {
|
|
433
432
|
label: 'min',
|
|
434
433
|
mathliveValue: '$\\mathrm{min}',
|
|
435
434
|
katexValue: 'min',
|
|
436
|
-
style: STYLE_PRESETS.LARGE,
|
|
437
435
|
},
|
|
438
436
|
H: {
|
|
439
437
|
label: 'h',
|
|
440
438
|
mathliveValue: '\\mathrm{h}',
|
|
441
439
|
katexValue: 'h',
|
|
442
|
-
style: STYLE_PRESETS.LARGE,
|
|
443
440
|
},
|
|
444
441
|
DAY: {
|
|
445
442
|
label: 'day',
|
package/src/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ type ControlledRequestProps<P> = {
|
|
|
14
14
|
abortAfter?: number
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
type RequestOptionalConfig = { signal?: AbortSignal }
|
|
18
18
|
|
|
19
19
|
export function controlledRequest<R = void, P = void>(
|
|
20
20
|
request: (props: P, config?: RequestOptionalConfig) => Promise<R>,
|
|
@@ -4,8 +4,8 @@ import Svg, { Circle } from 'react-native-svg'
|
|
|
4
4
|
|
|
5
5
|
export const CDotIcon = ({ size = 20, color }: IconProps) => {
|
|
6
6
|
return (
|
|
7
|
-
<Svg width={size} height={size} viewBox="0 0
|
|
8
|
-
<Circle cx="
|
|
7
|
+
<Svg width={size} height={size} viewBox="0 0 16 16" fill="none">
|
|
8
|
+
<Circle cx="8.00001" cy="8.00001" r="2.00001" fill={color} />
|
|
9
9
|
</Svg>
|
|
10
10
|
)
|
|
11
11
|
}
|
|
@@ -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,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.textToSSML = exports.findCurrentMark = void 0;
|
|
7
|
-
const escapeXml = str => str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Converts plain text to SSML with word marks for TTS highlighting.
|
|
11
|
-
* "Hello world" -> '<speak><mark name="w_0"/>Hello <mark name="w_1"/>world</speak>'
|
|
12
|
-
*/
|
|
13
|
-
const textToSSML = text => {
|
|
14
|
-
const words = text.split(/\s+/).filter(Boolean);
|
|
15
|
-
if (words.length === 0) return '<speak></speak>';
|
|
16
|
-
const ssmlParts = words.map((word, i) => `<mark name="w_${i}"/>${escapeXml(word)}`);
|
|
17
|
-
return `<speak>${ssmlParts.join(' ')}</speak>`;
|
|
18
|
-
};
|
|
19
|
-
exports.textToSSML = textToSSML;
|
|
20
|
-
const findCurrentMark = (timepoints, time) => {
|
|
21
|
-
for (let i = timepoints.length - 1; i >= 0; i--) {
|
|
22
|
-
if (timepoints[i].timeSeconds <= time) {
|
|
23
|
-
return timepoints[i].markName;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return undefined;
|
|
27
|
-
};
|
|
28
|
-
exports.findCurrentMark = findCurrentMark;
|
|
29
|
-
//# 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","exports","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;AACO,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;AAAAC,OAAA,CAAAZ,UAAA,GAAAA,UAAA;AAEM,MAAMa,eAAe,GAAGA,CAACC,UAAuB,EAAEC,IAAY,KAAyB;EAC5F,KAAK,IAAIL,CAAC,GAAGI,UAAU,CAACR,MAAM,GAAG,CAAC,EAAEI,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC/C,IAAII,UAAU,CAACJ,CAAC,CAAC,CAACM,WAAW,IAAID,IAAI,EAAE;MACrC,OAAOD,UAAU,CAACJ,CAAC,CAAC,CAACO,QAAQ;IAC/B;EACF;EACA,OAAOC,SAAS;AAClB,CAAC;AAAAN,OAAA,CAAAC,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ChatTTSHighlightModel = void 0;
|
|
7
|
-
var _effector = require("effector");
|
|
8
|
-
var _ttsHighlight = require("../helpers/ttsHighlight.js");
|
|
9
|
-
var _constants = require("../constants.js");
|
|
10
|
-
/**
|
|
11
|
-
* Manages word-by-word highlight state during TTS playback.
|
|
12
|
-
* Tracks which word index should be highlighted based on audio timepoints
|
|
13
|
-
* and current playback time from the AudioProvider.
|
|
14
|
-
*/
|
|
15
|
-
class ChatTTSHighlightModel {
|
|
16
|
-
lastMark = undefined;
|
|
17
|
-
setTimepoints = (0, _effector.createEvent)();
|
|
18
|
-
setTime = (0, _effector.createEvent)();
|
|
19
|
-
setIsActive = (0, _effector.createEvent)();
|
|
20
|
-
reset = (0, _effector.createEvent)();
|
|
21
|
-
$time = (0, _effector.restore)(this.setTime, 0).reset(this.reset);
|
|
22
|
-
$timepoints = (0, _effector.restore)(this.setTimepoints, []).reset(this.reset);
|
|
23
|
-
$isActive = (0, _effector.restore)(this.setIsActive, false).reset(this.reset);
|
|
24
|
-
$highlightedWordIndex = (0, _effector.combine)(this.$timepoints, this.$time, this.$isActive, (timepoints, time, isActive) => {
|
|
25
|
-
if (!isActive || !timepoints.length) return -1;
|
|
26
|
-
const currentMark = (0, _ttsHighlight.findCurrentMark)(timepoints, time);
|
|
27
|
-
if (!currentMark) return -1;
|
|
28
|
-
const match = currentMark.match(_constants.WORD_MARK_REGEX);
|
|
29
|
-
return match ? parseInt(match[1], 10) : -1;
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Sets timepoints and starts listening to AudioProvider time updates.
|
|
34
|
-
* Only triggers store updates when the highlighted word actually changes.
|
|
35
|
-
*/
|
|
36
|
-
activate(timepoints, onTimeUpdate) {
|
|
37
|
-
this.setTimepoints(timepoints);
|
|
38
|
-
this.setIsActive(true);
|
|
39
|
-
this.lastMark = undefined;
|
|
40
|
-
onTimeUpdate(time => {
|
|
41
|
-
const currentMark = (0, _ttsHighlight.findCurrentMark)(this.$timepoints.getState(), time);
|
|
42
|
-
if (!currentMark) return;
|
|
43
|
-
if (currentMark !== this.lastMark) {
|
|
44
|
-
this.lastMark = currentMark;
|
|
45
|
-
this.setTime(time);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
deactivate(onTimeUpdate) {
|
|
50
|
-
onTimeUpdate?.(null);
|
|
51
|
-
this.lastMark = undefined;
|
|
52
|
-
this.reset();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.ChatTTSHighlightModel = ChatTTSHighlightModel;
|
|
56
|
-
//# sourceMappingURL=ChatTTSHighlightModel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","_ttsHighlight","_constants","ChatTTSHighlightModel","lastMark","undefined","setTimepoints","createEvent","setTime","setIsActive","reset","$time","restore","$timepoints","$isActive","$highlightedWordIndex","combine","timepoints","time","isActive","length","currentMark","findCurrentMark","match","WORD_MARK_REGEX","parseInt","activate","onTimeUpdate","getState","deactivate","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatTTSHighlightModel.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMG,qBAAqB,CAAC;EACzBC,QAAQ,GAAuBC,SAAS;EAEvCC,aAAa,GAAG,IAAAC,qBAAW,EAAc,CAAC;EAC1CC,OAAO,GAAG,IAAAD,qBAAW,EAAS,CAAC;EAC/BE,WAAW,GAAG,IAAAF,qBAAW,EAAU,CAAC;EACpCG,KAAK,GAAG,IAAAH,qBAAW,EAAC,CAAC;EAErBI,KAAK,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACJ,OAAO,EAAE,CAAC,CAAC,CAACE,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EAClDG,WAAW,GAAG,IAAAD,iBAAO,EAAC,IAAI,CAACN,aAAa,EAAE,EAAE,CAAC,CAACI,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EAC/DI,SAAS,GAAG,IAAAF,iBAAO,EAAC,IAAI,CAACH,WAAW,EAAE,KAAK,CAAC,CAACC,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EAE9DK,qBAAqB,GAAG,IAAAC,iBAAO,EACtC,IAAI,CAACH,WAAW,EAChB,IAAI,CAACF,KAAK,EACV,IAAI,CAACG,SAAS,EACd,CAACG,UAAU,EAAEC,IAAI,EAAEC,QAAQ,KAAK;IAC9B,IAAI,CAACA,QAAQ,IAAI,CAACF,UAAU,CAACG,MAAM,EAAE,OAAO,CAAC,CAAC;IAE9C,MAAMC,WAAW,GAAG,IAAAC,6BAAe,EAACL,UAAU,EAAEC,IAAI,CAAC;IACrD,IAAI,CAACG,WAAW,EAAE,OAAO,CAAC,CAAC;IAE3B,MAAME,KAAK,GAAGF,WAAW,CAACE,KAAK,CAACC,0BAAe,CAAC;IAChD,OAAOD,KAAK,GAAGE,QAAQ,CAACF,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;EAC5C,CACF,CAAC;;EAED;AACF;AACA;AACA;EACEG,QAAQA,CAACT,UAAuB,EAAEU,YAA0B,EAAE;IAC5D,IAAI,CAACrB,aAAa,CAACW,UAAU,CAAC;IAC9B,IAAI,CAACR,WAAW,CAAC,IAAI,CAAC;IACtB,IAAI,CAACL,QAAQ,GAAGC,SAAS;IAEzBsB,YAAY,CAAET,IAAY,IAAK;MAC7B,MAAMG,WAAW,GAAG,IAAAC,6BAAe,EAAC,IAAI,CAACT,WAAW,CAACe,QAAQ,CAAC,CAAC,EAAEV,IAAI,CAAC;MACtE,IAAI,CAACG,WAAW,EAAE;MAElB,IAAIA,WAAW,KAAK,IAAI,CAACjB,QAAQ,EAAE;QACjC,IAAI,CAACA,QAAQ,GAAGiB,WAAW;QAC3B,IAAI,CAACb,OAAO,CAACU,IAAI,CAAC;MACpB;IACF,CAAC,CAAC;EACJ;EAEAW,UAAUA,CAACF,YAAiC,EAAE;IAC5CA,YAAY,GAAG,IAAI,CAAC;IACpB,IAAI,CAACvB,QAAQ,GAAGC,SAAS;IACzB,IAAI,CAACK,KAAK,CAAC,CAAC;EACd;AACF;AAACoB,OAAA,CAAA3B,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|