@magmamath/students-features 1.6.0-rc.1 → 1.6.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/chatbot/components/Chat/AIAvatar.js +33 -0
- package/dist/commonjs/features/chatbot/components/Chat/AIAvatar.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js +22 -8
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chat/ChatbotAvatar.js +44 -0
- package/dist/commonjs/features/chatbot/components/Chat/ChatbotAvatar.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Chat/MessageItem.js +2 -0
- package/dist/commonjs/features/chatbot/components/Chat/MessageItem.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +15 -19
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatLauncher.js +42 -0
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatLauncher.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +15 -10
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +11 -7
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +18 -5
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +6 -1
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js +34 -0
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +13 -10
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +9 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
- package/dist/commonjs/features/fluency/components/Fluency.js +12 -6
- package/dist/commonjs/features/fluency/components/Fluency.js.map +1 -1
- package/dist/commonjs/features/fluency/components/FluencyStatusOverlay.js +101 -0
- package/dist/commonjs/features/fluency/components/FluencyStatusOverlay.js.map +1 -0
- package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js +13 -5
- package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -1
- package/dist/commonjs/features/fluency/model/FluencyModel.js +21 -0
- package/dist/commonjs/features/fluency/model/FluencyModel.js.map +1 -1
- package/dist/commonjs/features/fluency/shared/fluency.constants.js +6 -1
- package/dist/commonjs/features/fluency/shared/fluency.constants.js.map +1 -1
- package/dist/commonjs/features/fluency/shared/fluency.helpers.js +3 -1
- package/dist/commonjs/features/fluency/shared/fluency.helpers.js.map +1 -1
- package/dist/commonjs/features/pmProgress/model/PmProgressModel.js +7 -1
- package/dist/commonjs/features/pmProgress/model/PmProgressModel.js.map +1 -1
- package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js +20 -4
- package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js.map +1 -1
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +22 -1
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js +4 -2
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js.map +1 -1
- package/dist/commonjs/shared/icons/{ChatbotIcon.js → LavaIcon.js} +8 -8
- package/dist/commonjs/shared/icons/LavaIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js +4 -4
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js.map +1 -1
- package/dist/commonjs/shared/icons/index.js +4 -4
- package/dist/commonjs/shared/icons/index.js.map +1 -1
- package/dist/module/features/chatbot/components/Chat/AIAvatar.js +27 -0
- package/dist/module/features/chatbot/components/Chat/AIAvatar.js.map +1 -0
- package/dist/module/features/chatbot/components/Chat/Chat.js +23 -9
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/module/features/chatbot/components/Chat/ChatbotAvatar.js +38 -0
- package/dist/module/features/chatbot/components/Chat/ChatbotAvatar.js.map +1 -0
- package/dist/module/features/chatbot/components/Chat/MessageItem.js +2 -0
- package/dist/module/features/chatbot/components/Chat/MessageItem.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +17 -21
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatControls/ChatLauncher.js +36 -0
- package/dist/module/features/chatbot/components/ChatControls/ChatLauncher.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +16 -11
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +11 -7
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +17 -4
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +5 -1
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/index.js +4 -0
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +14 -11
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +10 -2
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
- package/dist/module/features/fluency/components/Fluency.js +14 -8
- package/dist/module/features/fluency/components/Fluency.js.map +1 -1
- package/dist/module/features/fluency/components/FluencyStatusOverlay.js +95 -0
- package/dist/module/features/fluency/components/FluencyStatusOverlay.js.map +1 -0
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js +13 -5
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -1
- package/dist/module/features/fluency/model/FluencyModel.js +22 -1
- package/dist/module/features/fluency/model/FluencyModel.js.map +1 -1
- package/dist/module/features/fluency/shared/fluency.constants.js +5 -0
- package/dist/module/features/fluency/shared/fluency.constants.js.map +1 -1
- package/dist/module/features/fluency/shared/fluency.helpers.js +1 -0
- package/dist/module/features/fluency/shared/fluency.helpers.js.map +1 -1
- package/dist/module/features/pmProgress/model/PmProgressModel.js +7 -1
- package/dist/module/features/pmProgress/model/PmProgressModel.js.map +1 -1
- package/dist/module/features/pmProgress/model/PmRecommendationsModel.js +20 -4
- package/dist/module/features/pmProgress/model/PmRecommendationsModel.js.map +1 -1
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +20 -0
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
- package/dist/module/shared/icons/ExcitedLavaIcon.js +4 -2
- package/dist/module/shared/icons/ExcitedLavaIcon.js.map +1 -1
- package/dist/module/shared/icons/{ChatbotIcon.js → LavaIcon.js} +6 -6
- package/dist/module/shared/icons/LavaIcon.js.map +1 -0
- package/dist/module/shared/icons/LavaIconInGlasses.js +4 -4
- package/dist/module/shared/icons/LavaIconInGlasses.js.map +1 -1
- package/dist/module/shared/icons/index.js +1 -1
- package/dist/module/shared/icons/index.js.map +1 -1
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts +1 -1
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/AIAvatar.d.ts +4 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/AIAvatar.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +3 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/ChatbotAvatar.d.ts +9 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/ChatbotAvatar.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/MessageItem.d.ts +3 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/MessageItem.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +8 -10
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatLauncher.d.ts +10 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatLauncher.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +2 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.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 +4 -6
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +15 -4
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts +2 -0
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +5 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/chat.types.d.ts +3 -0
- package/dist/typescript/commonjs/features/chatbot/types/chat.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +2 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/FluencyStatusOverlay.d.ts +8 -0
- package/dist/typescript/commonjs/features/fluency/components/FluencyStatusOverlay.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/shared/fluency.constants.d.ts +4 -0
- package/dist/typescript/commonjs/features/fluency/shared/fluency.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/shared/fluency.helpers.d.ts +1 -0
- package/dist/typescript/commonjs/features/fluency/shared/fluency.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/KeysList/KeysList.d.ts +1 -1
- package/dist/typescript/commonjs/features/keyboard/components/KeysList/helpers.d.ts +2 -2
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts +9 -38
- package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts +1 -1
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/LavaIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/LavaIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts +2 -2
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/index.d.ts +1 -1
- package/dist/typescript/commonjs/shared/icons/index.d.ts.map +1 -1
- package/dist/typescript/module/features/celebrations/helpers.d.ts +1 -1
- package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chat/AIAvatar.d.ts +4 -0
- package/dist/typescript/module/features/chatbot/components/Chat/AIAvatar.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts +3 -1
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chat/ChatbotAvatar.d.ts +9 -0
- package/dist/typescript/module/features/chatbot/components/Chat/ChatbotAvatar.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Chat/MessageItem.d.ts +3 -1
- package/dist/typescript/module/features/chatbot/components/Chat/MessageItem.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +8 -10
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatLauncher.d.ts +10 -0
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatLauncher.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +2 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.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 +4 -6
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +15 -4
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/helpers.d.ts +2 -0
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +5 -1
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/chat.types.d.ts +3 -0
- package/dist/typescript/module/features/chatbot/types/chat.types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +2 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/types.d.ts +1 -0
- package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/Fluency.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/FluencyStatusOverlay.d.ts +8 -0
- package/dist/typescript/module/features/fluency/components/FluencyStatusOverlay.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts +3 -0
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/shared/fluency.constants.d.ts +4 -0
- package/dist/typescript/module/features/fluency/shared/fluency.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/shared/fluency.helpers.d.ts +1 -0
- package/dist/typescript/module/features/fluency/shared/fluency.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/keyboard/components/KeysList/KeysList.d.ts +1 -1
- package/dist/typescript/module/features/keyboard/components/KeysList/helpers.d.ts +2 -2
- package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts +9 -38
- package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts +1 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts +1 -1
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/LavaIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/LavaIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts +2 -2
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/index.d.ts +1 -1
- package/dist/typescript/module/shared/icons/index.d.ts.map +1 -1
- package/package.json +13 -20
- package/src/features/chatbot/components/Chat/AIAvatar.tsx +22 -0
- package/src/features/chatbot/components/Chat/Chat.tsx +30 -8
- package/src/features/chatbot/components/Chat/ChatbotAvatar.tsx +44 -0
- package/src/features/chatbot/components/Chat/MessageItem.tsx +4 -0
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +26 -21
- package/src/features/chatbot/components/ChatControls/ChatLauncher.tsx +44 -0
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +2 -0
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +27 -8
- package/src/features/chatbot/components/Chatbot.tsx +11 -7
- package/src/features/chatbot/constants.ts +18 -3
- package/src/features/chatbot/helpers.ts +14 -1
- package/src/features/chatbot/index.ts +10 -1
- package/src/features/chatbot/types/chat.types.ts +4 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +18 -8
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +12 -2
- package/src/features/endOfAssignment/types.ts +1 -0
- package/src/features/fluency/components/Fluency.tsx +17 -9
- package/src/features/fluency/components/FluencyStatusOverlay.tsx +101 -0
- package/src/features/fluency/components/select-math-operator/SelectMathOperator.tsx +13 -5
- package/src/features/fluency/model/FluencyModel.ts +25 -1
- package/src/features/fluency/shared/fluency.constants.ts +5 -0
- package/src/features/fluency/shared/fluency.helpers.ts +3 -0
- package/src/features/pmProgress/model/PmProgressModel.ts +4 -1
- package/src/features/pmProgress/model/PmRecommendationsModel.ts +22 -6
- package/src/features/pmProgress/shared/pmProgress.helpers.ts +33 -0
- package/src/i18n/.generated/schema.json +7 -3
- package/src/shared/icons/ExcitedLavaIcon.tsx +5 -1
- package/src/shared/icons/{ChatbotIcon.tsx → LavaIcon.tsx} +5 -3
- package/src/shared/icons/LavaIconInGlasses.tsx +5 -3
- package/src/shared/icons/index.ts +1 -1
- package/dist/commonjs/features/chatbot/components/Chat/ChatIcon.js +0 -37
- package/dist/commonjs/features/chatbot/components/Chat/ChatIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/ChatbotIcon.js.map +0 -1
- package/dist/module/features/chatbot/components/Chat/ChatIcon.js +0 -31
- package/dist/module/features/chatbot/components/Chat/ChatIcon.js.map +0 -1
- package/dist/module/shared/icons/ChatbotIcon.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/ChatIcon.d.ts +0 -7
- package/dist/typescript/commonjs/features/chatbot/components/Chat/ChatIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/ChatbotIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/ChatbotIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Chat/ChatIcon.d.ts +0 -7
- package/dist/typescript/module/features/chatbot/components/Chat/ChatIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/ChatbotIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/ChatbotIcon.d.ts.map +0 -1
- package/src/features/chatbot/components/Chat/ChatIcon.tsx +0 -30
|
@@ -9,6 +9,7 @@ type CreateFluencyModeParams = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const createFluencyMode: ({ mode, label, symbol, colorFamily, }: CreateFluencyModeParams) => FluencyModeConfig;
|
|
11
11
|
export declare const buildMatrixGrid: (data: GetMatrixResponse, mode: FluencyMode) => MatrixGrid;
|
|
12
|
+
export declare const allFactsEmpty: (response: GetMatrixResponse) => boolean;
|
|
12
13
|
export declare const generateStreakDates: (stats: GetWeeklyStatsResponse) => StreakStatus[];
|
|
13
14
|
export {};
|
|
14
15
|
//# sourceMappingURL=fluency.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluency.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/fluency/shared/fluency.helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAElB,WAAW,EAEX,YAAY,EAEb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EAEtB,UAAU,EACX,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,KAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,iBAAiB,0CAK3B,uBAAuB,KAAG,iBA4B5B,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,iBAAiB,QAAQ,WAAW,KAAG,UAyD5E,CAAA;AAED,eAAO,MAAM,mBAAmB,UAAW,sBAAsB,mBAchE,CAAA"}
|
|
1
|
+
{"version":3,"file":"fluency.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/fluency/shared/fluency.helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAElB,WAAW,EAEX,YAAY,EAEb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EAEtB,UAAU,EACX,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,KAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,iBAAiB,0CAK3B,uBAAuB,KAAG,iBA4B5B,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,iBAAiB,QAAQ,WAAW,KAAG,UAyD5E,CAAA;AAED,eAAO,MAAM,aAAa,aAAc,iBAAiB,KAAG,OAC0B,CAAA;AAEtF,eAAO,MAAM,mBAAmB,UAAW,sBAAsB,mBAchE,CAAA"}
|
|
@@ -18,7 +18,7 @@ export declare const mapKeyToOption: ({ key, onKeyPress, disabledKeys, optionSty
|
|
|
18
18
|
style: {
|
|
19
19
|
container: (import("react-native").StyleProp<import("react-native").ViewStyle> | {
|
|
20
20
|
flexGrow: number;
|
|
21
|
-
flexBasis:
|
|
21
|
+
flexBasis: "auto" | 45;
|
|
22
22
|
})[];
|
|
23
23
|
button: (import("react-native").StyleProp<import("react-native").ViewStyle> | {
|
|
24
24
|
width: number;
|
|
@@ -37,7 +37,7 @@ export declare const mapKeyToOption: ({ key, onKeyPress, disabledKeys, optionSty
|
|
|
37
37
|
style: {
|
|
38
38
|
container: (import("react-native").StyleProp<import("react-native").ViewStyle> | {
|
|
39
39
|
flexGrow: number;
|
|
40
|
-
flexBasis:
|
|
40
|
+
flexBasis: "auto" | 45;
|
|
41
41
|
})[];
|
|
42
42
|
button: (import("react-native").StyleProp<import("react-native").ViewStyle> | {
|
|
43
43
|
width: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PmProgressModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/model/PmProgressModel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,KAAK,oBAAoB,GAAG;IAC1B,GAAG,EAAE,kBAAkB,CAAA;CACxB,CAAA;AAED,qBAAa,eAAe;IAC1B,SAAgB,IAAI,qDAAoC;IAExD,SAAgB,GAAG,EAAE,aAAa,CAAA;IAClC,SAAgB,IAAI,EAAE,WAAW,CAAA;IACjC,SAAgB,SAAS,EAAE,gBAAgB,CAAA;IAC3C,SAAgB,QAAQ,EAAE,eAAe,CAAA;IACzC,SAAgB,eAAe,EAAE,sBAAsB,CAAA;IACvD,SAAgB,OAAO,EAAE,kBAAkB,CAAA;gBAE/B,EAAE,GAAG,EAAE,EAAE,oBAAoB;IAWzC,OAAO,CAAC,IAAI;
|
|
1
|
+
{"version":3,"file":"PmProgressModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/model/PmProgressModel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,KAAK,oBAAoB,GAAG;IAC1B,GAAG,EAAE,kBAAkB,CAAA;CACxB,CAAA;AAED,qBAAa,eAAe;IAC1B,SAAgB,IAAI,qDAAoC;IAExD,SAAgB,GAAG,EAAE,aAAa,CAAA;IAClC,SAAgB,IAAI,EAAE,WAAW,CAAA;IACjC,SAAgB,SAAS,EAAE,gBAAgB,CAAA;IAC3C,SAAgB,QAAQ,EAAE,eAAe,CAAA;IACzC,SAAgB,eAAe,EAAE,sBAAsB,CAAA;IACvD,SAAgB,OAAO,EAAE,kBAAkB,CAAA;gBAE/B,EAAE,GAAG,EAAE,EAAE,oBAAoB;IAWzC,OAAO,CAAC,IAAI;CAgBb"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { PmProgressApi } from './PmProgressApi';
|
|
2
2
|
import { Recommendations, TreeMappingResponse } from '../shared/pmProgress.types';
|
|
3
3
|
import { SolvingFlow } from '../shared/pmProgress.constants';
|
|
4
|
+
type FetchMagmaRecsParams = {
|
|
5
|
+
tree: TreeMappingResponse;
|
|
6
|
+
lockedGrades: number[];
|
|
7
|
+
};
|
|
4
8
|
export declare class PmRecommendationsModel {
|
|
5
9
|
private readonly api;
|
|
6
10
|
readonly reset: import("effector").EventCallable<void>;
|
|
@@ -30,30 +34,13 @@ export declare class PmRecommendationsModel {
|
|
|
30
34
|
limit: number;
|
|
31
35
|
total: number;
|
|
32
36
|
}, Error>;
|
|
33
|
-
readonly fetchMagmaRecsFx: import("effector").Effect<
|
|
34
|
-
items:
|
|
35
|
-
type: SolvingFlow;
|
|
36
|
-
_id: string;
|
|
37
|
-
nameTranslations: string;
|
|
38
|
-
shortDescriptionTranslations: string;
|
|
39
|
-
descriptionTranslations: string;
|
|
40
|
-
ability: {
|
|
41
|
-
functionName: string;
|
|
42
|
-
problemCount: number;
|
|
43
|
-
sectionId: string;
|
|
44
|
-
visibility: unknown[];
|
|
45
|
-
};
|
|
46
|
-
theory: {
|
|
47
|
-
languageCode: string;
|
|
48
|
-
theory: string;
|
|
49
|
-
}[];
|
|
50
|
-
difficulty: number;
|
|
51
|
-
}[];
|
|
37
|
+
readonly fetchMagmaRecsFx: import("effector").Effect<FetchMagmaRecsParams, {
|
|
38
|
+
items: import("../shared/pmProgress.types").Skill[];
|
|
52
39
|
offset: number;
|
|
53
40
|
limit: number;
|
|
54
41
|
total: number;
|
|
55
42
|
}, Error>;
|
|
56
|
-
readonly initRecommendationsFx: import("effector").Effect<
|
|
43
|
+
readonly initRecommendationsFx: import("effector").Effect<FetchMagmaRecsParams, [{
|
|
57
44
|
items: {
|
|
58
45
|
type: SolvingFlow;
|
|
59
46
|
_id: string;
|
|
@@ -76,28 +63,12 @@ export declare class PmRecommendationsModel {
|
|
|
76
63
|
limit: number;
|
|
77
64
|
total: number;
|
|
78
65
|
}, {
|
|
79
|
-
items:
|
|
80
|
-
type: SolvingFlow;
|
|
81
|
-
_id: string;
|
|
82
|
-
nameTranslations: string;
|
|
83
|
-
shortDescriptionTranslations: string;
|
|
84
|
-
descriptionTranslations: string;
|
|
85
|
-
ability: {
|
|
86
|
-
functionName: string;
|
|
87
|
-
problemCount: number;
|
|
88
|
-
sectionId: string;
|
|
89
|
-
visibility: unknown[];
|
|
90
|
-
};
|
|
91
|
-
theory: {
|
|
92
|
-
languageCode: string;
|
|
93
|
-
theory: string;
|
|
94
|
-
}[];
|
|
95
|
-
difficulty: number;
|
|
96
|
-
}[];
|
|
66
|
+
items: import("../shared/pmProgress.types").Skill[];
|
|
97
67
|
offset: number;
|
|
98
68
|
limit: number;
|
|
99
69
|
total: number;
|
|
100
70
|
}], Error>;
|
|
101
71
|
private fetchRecs;
|
|
102
72
|
}
|
|
73
|
+
export {};
|
|
103
74
|
//# sourceMappingURL=PmRecommendationsModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PmRecommendationsModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/model/PmRecommendationsModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAgB,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAC/F,OAAO,EAA+B,WAAW,EAAE,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"PmRecommendationsModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/model/PmRecommendationsModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,eAAe,EAAgB,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAC/F,OAAO,EAA+B,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAGzF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,mBAAmB,CAAA;IACzB,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB,CAAA;AAID,qBAAa,sBAAsB;IAMrB,OAAO,CAAC,QAAQ,CAAC,GAAG;IALhC,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,QAAQ,oDAA6D;IACrF,SAAgB,MAAM,oDAA6D;gBAEtD,GAAG,EAAE,aAAa;IAK/C,SAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;cAIjC;IAED,SAAgB,gBAAgB;;;;;cAU/B;IAED,SAAgB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;eAMpC;IAED,OAAO,CAAC,SAAS,CAahB;CACF"}
|
|
@@ -72,6 +72,7 @@ export declare const startGradesFrom: (grades: Grade[], startGrade: number) => G
|
|
|
72
72
|
export declare const isFluencyDomain: (title: string) => boolean;
|
|
73
73
|
export declare const formatGradeName: (grade: number) => string;
|
|
74
74
|
export declare const formatGradeLabel: (grade: number, customLabelsMap?: GradeLabelsMap) => string;
|
|
75
|
+
export declare const filterLockedGradeRecs: (skills: Skill[], treeMapping: TreeMappingResponse["treeMapping"], lockedGrades: number[]) => Skill[];
|
|
75
76
|
export declare const getTreeGrades: (tree: TreeMappingResponse, user: User) => Grade[];
|
|
76
77
|
export {};
|
|
77
78
|
//# sourceMappingURL=pmProgress.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pmProgress.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/shared/pmProgress.helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAA;AAChG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EACL,MAAM,EACN,cAAc,EACd,KAAK,EACL,KAAK,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,IAAI,EACL,MAAM,oBAAoB,CAAA;AAG3B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AA0D5E,eAAO,MAAM,kBAAkB,SACvB,sBAAsB,CAAC,MAAM,CAAC,eACvB,mBAAmB,CAAC,aAAa,CAAC,KAC9C,MAAM,EAqBR,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACrC,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,6DAK3B,uBAAuB,KAAG,MAAM,GAAG,IAmBrC,CAAA;AAED,eAAO,MAAM,UAAU,OAAQ,MAAM,KAAG,MAKvC,CAAA;AAED,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAChC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAA;IAC3B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,mBAAmB,CAAA;IACzB,KAAK,EAAE,aAAa,CAAA;IACpB,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,eAAe,WAAY,cAAc,KAAG,MAAM,IAAI,aAC6B,CAAA;AAEhG,KAAK,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAA;AACzD,KAAK,yBAAyB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;AAE7D,eAAO,MAAM,2BAA2B,WAC9B,oBAAoB,KAC3B,MAAM,IAAI,yBAC0D,CAAA;AAEvE,eAAO,MAAM,iBAAiB,SAAU,MAAM,KAAG,qBAoBhD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,aACzB,cAAc,iBACT,aAAa,KAC3B,KAAK,EAIgF,CAAA;AAExF;;;GAGG;AACH,eAAO,MAAM,gCAAgC,aACjC,cAAc,iBACT,aAAa,KAC3B,KAAK,EAOP,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,8BAA8B,WACjC,MAAM,iBACC,aAAa,sBACR,MAAM,KACzB,KAAK,EAG+D,CAAA;AAEvE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,YAAa,MAAM,EAAE,iBAAiB,aAAa,KAAG,KAAK,EAG1B,CAAA;AAErE,0FAA0F;AAC1F,eAAO,MAAM,uBAAuB,OAAQ,MAAM,SAAS,KAAK,EAAE,KAAG,KAAK,EAIzE,CAAA;AAED,eAAO,MAAM,iBAAiB,WAAY,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,KAAG,KAAK,EAQtE,CAAA;AAED,eAAO,MAAM,mBAAmB,YAAa,MAAM,WAAW,MAAM,EAAE,KAAG,MAAM,GAAG,SACN,CAAA;AAG5E,eAAO,MAAM,eAAe,WAAY,KAAK,EAAE,cAAc,MAAM,KAAG,KAAK,EAI1E,CAAA;AAED,eAAO,MAAM,eAAe,UAAW,MAAM,YAE5C,CAAA;AAED,eAAO,MAAM,eAAe,UAAW,MAAM,KAAG,MAI/C,CAAA;AAED,eAAO,MAAM,gBAAgB,UAAW,MAAM,oBAAoB,cAAc,KAAG,MAQlF,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,mBAAmB,QAAQ,IAAI,KAAG,KAAK,EAgB1E,CAAA"}
|
|
1
|
+
{"version":3,"file":"pmProgress.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/features/pmProgress/shared/pmProgress.helpers.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProps } from './icon.types';
|
|
3
|
-
export declare const ExcitedLavaIcon: ({
|
|
3
|
+
export declare const ExcitedLavaIcon: ({ size }: IconProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=ExcitedLavaIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExcitedLavaIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/ExcitedLavaIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"ExcitedLavaIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/ExcitedLavaIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAIxC,eAAO,MAAM,eAAe,aAAmB,SAAS,sBA0hBvD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LavaIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/LavaIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAItD,eAAO,MAAM,QAAQ,aAAmB,SAAS,sBAugBhD,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IconProps } from '
|
|
3
|
-
export declare const LavaIconInGlasses: ({
|
|
2
|
+
import { IconProps } from '@magmamath/react-native-ui';
|
|
3
|
+
export declare const LavaIconInGlasses: ({ size }: IconProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=LavaIconInGlasses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LavaIconInGlasses.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/LavaIconInGlasses.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"LavaIconInGlasses.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/LavaIconInGlasses.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAItD,eAAO,MAAM,iBAAiB,aAAmB,SAAS,sBA4dzD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,MAAM,CAAA;AACpB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "1.6.0
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -32,23 +32,12 @@
|
|
|
32
32
|
"default": "./dist/commonjs/features/voice/index.js"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
"./fluency-teacher": {
|
|
36
|
-
"react-native": "./src/features/fluency-teacher/index.ts",
|
|
37
|
-
"source": "./src/features/fluency-teacher/index.ts",
|
|
38
|
-
"import": {
|
|
39
|
-
"types": "./dist/typescript/module/features/fluency-teacher/index.d.ts",
|
|
40
|
-
"default": "./dist/module/features/fluency-teacher/index.js"
|
|
41
|
-
},
|
|
42
|
-
"require": {
|
|
43
|
-
"types": "./dist/typescript/commonjs/features/fluency-teacher/index.d.ts",
|
|
44
|
-
"default": "./dist/commonjs/features/fluency-teacher/index.js"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
35
|
"./package.json": "./package.json"
|
|
48
36
|
},
|
|
49
37
|
"files": [
|
|
50
38
|
"src",
|
|
51
|
-
"dist"
|
|
39
|
+
"dist",
|
|
40
|
+
"!dist/typescript/example"
|
|
52
41
|
],
|
|
53
42
|
"scripts": {
|
|
54
43
|
"clean": "del-cli dist",
|
|
@@ -70,8 +59,8 @@
|
|
|
70
59
|
"effector-storage": "^8.0.0",
|
|
71
60
|
"expo": ">=52.0.47",
|
|
72
61
|
"expo-audio": "^1.1.1",
|
|
73
|
-
"i18next": ">=23",
|
|
74
62
|
"expo-linear-gradient": "*",
|
|
63
|
+
"i18next": ">=23",
|
|
75
64
|
"patronum": "^2.3.0",
|
|
76
65
|
"react": "*",
|
|
77
66
|
"react-i18next": ">=15",
|
|
@@ -85,7 +74,7 @@
|
|
|
85
74
|
"devDependencies": {
|
|
86
75
|
"@magmamath/frontend-config": "1.4.0",
|
|
87
76
|
"@magmamath/react-native-draw-board": "1.8.2",
|
|
88
|
-
"@magmamath/react-native-ui": "0.
|
|
77
|
+
"@magmamath/react-native-ui": "0.5.9",
|
|
89
78
|
"@magmamath/students-qa": "0.1.9",
|
|
90
79
|
"@matteappen/skills-utils": "^3.7.1",
|
|
91
80
|
"@react-native-masked-view/masked-view": "^0.3.2",
|
|
@@ -94,7 +83,7 @@
|
|
|
94
83
|
"@types/d3-shape": "3.1.7",
|
|
95
84
|
"@types/jest": "^29.5.5",
|
|
96
85
|
"@types/react": "^18.2.44",
|
|
97
|
-
"axios": "^1.
|
|
86
|
+
"axios": "^1.15.2",
|
|
98
87
|
"del-cli": "^5.1.0",
|
|
99
88
|
"effector": "^23.2.3",
|
|
100
89
|
"effector-action": "1.2.2",
|
|
@@ -123,7 +112,12 @@
|
|
|
123
112
|
"typescript": "^5.2.2"
|
|
124
113
|
},
|
|
125
114
|
"resolutions": {
|
|
126
|
-
"@types/react": "^18.2.44"
|
|
115
|
+
"@types/react": "^18.2.44",
|
|
116
|
+
"@babel/plugin-transform-modules-systemjs": "7.29.4",
|
|
117
|
+
"basic-ftp": "5.3.1",
|
|
118
|
+
"@xmldom/xmldom": "0.8.13",
|
|
119
|
+
"lodash": "4.18.1",
|
|
120
|
+
"handlebars": "4.7.9"
|
|
127
121
|
},
|
|
128
122
|
"repository": "https://github.com/matteappen/magmamath-features.git",
|
|
129
123
|
"author": "magmamath <magmamath@gmail.com> (https://magmamath.com)",
|
|
@@ -146,6 +140,5 @@
|
|
|
146
140
|
"languages": "js",
|
|
147
141
|
"type": "library",
|
|
148
142
|
"version": "0.44.3"
|
|
149
|
-
}
|
|
150
|
-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
143
|
+
}
|
|
151
144
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { COLORS, SHADOWS, SPACING, SparkIcon } from '@magmamath/react-native-ui'
|
|
4
|
+
import { AI_AVATAR_BORDER_RADIUS, AI_ICON_SIZE } from '../../constants'
|
|
5
|
+
import { AvatarProps } from '../../types/chat.types'
|
|
6
|
+
|
|
7
|
+
export const AIAvatar = ({ size = AI_ICON_SIZE }: AvatarProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<View style={styles.container}>
|
|
10
|
+
<SparkIcon color={COLORS.PRIMARY_ORANGE} size={size} />
|
|
11
|
+
</View>
|
|
12
|
+
)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const styles = StyleSheet.create({
|
|
16
|
+
container: {
|
|
17
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
18
|
+
padding: SPACING['300'],
|
|
19
|
+
borderRadius: AI_AVATAR_BORDER_RADIUS,
|
|
20
|
+
...SHADOWS['2'],
|
|
21
|
+
},
|
|
22
|
+
})
|
|
@@ -9,19 +9,20 @@ import React, {
|
|
|
9
9
|
import { FlatList, ListRenderItemInfo, StyleSheet, View } from 'react-native'
|
|
10
10
|
import { useStoreMap, useUnit } from 'effector-react'
|
|
11
11
|
import { SPACING } from '@magmamath/react-native-ui'
|
|
12
|
+
import { TEST_IDS } from '@magmamath/students-qa'
|
|
12
13
|
|
|
13
14
|
import { ConversationMessage } from '../../types/units.types'
|
|
14
15
|
import { ChatbotModel } from '../../model/ChatBotModel'
|
|
15
16
|
import { MessageLoader } from '../ChatMessage/MessageLoader'
|
|
16
17
|
import { ColorScheme } from '../../types/style.types'
|
|
17
18
|
import { TTSHighlightRenderer } from '../../types/t2s.types'
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { MessageItem } from './MessageItem'
|
|
21
|
-
import { CHAT_CONTAINER_WIDTH } from '../../constants'
|
|
19
|
+
import { CHAT_CONTAINER_WIDTH, ChatbotVariant, FLOATING_AVATAR_BOTTOM } from '../../constants'
|
|
20
|
+
import { getChatbotAvatarVariant } from '../../helpers'
|
|
22
21
|
import { useChatScroll } from '../../hooks/useChatScroll'
|
|
23
22
|
import { useChatFade, FadeOverlays } from '../../hooks/useChatFade'
|
|
24
|
-
import {
|
|
23
|
+
import { ChatInputBlock } from './ChatInputBlock'
|
|
24
|
+
import { MessageItem } from './MessageItem'
|
|
25
|
+
import { ChatbotAvatar } from './ChatbotAvatar'
|
|
25
26
|
|
|
26
27
|
const Separator = () => <View style={styles.separator} />
|
|
27
28
|
const keyExtractor = (item: ConversationMessage, index: number) => `${item.id}-${index}`
|
|
@@ -31,6 +32,7 @@ type ChatProps = {
|
|
|
31
32
|
isHintFeedback: boolean
|
|
32
33
|
isTextToSpeechEnabled: boolean
|
|
33
34
|
isInputDisabled?: boolean
|
|
35
|
+
chatbotVariant?: ChatbotVariant
|
|
34
36
|
maxHeight?: number
|
|
35
37
|
colorScheme?: ColorScheme
|
|
36
38
|
MessageWrapper?: ComponentType<PropsWithChildren>
|
|
@@ -43,6 +45,7 @@ export const Chat = ({
|
|
|
43
45
|
isHintFeedback,
|
|
44
46
|
isTextToSpeechEnabled,
|
|
45
47
|
isInputDisabled,
|
|
48
|
+
chatbotVariant = ChatbotVariant.LAVA,
|
|
46
49
|
maxHeight = 100,
|
|
47
50
|
colorScheme = ColorScheme.Blue,
|
|
48
51
|
MessageWrapper,
|
|
@@ -83,6 +86,7 @@ export const Chat = ({
|
|
|
83
86
|
withIcon={withIcon}
|
|
84
87
|
colorScheme={colorScheme}
|
|
85
88
|
isInputDisabled={isInputDisabled}
|
|
89
|
+
chatbotVariant={chatbotVariant}
|
|
86
90
|
isTextToSpeechEnabled={isTextToSpeechEnabled}
|
|
87
91
|
shouldWrapMessage={shouldWrapMessage}
|
|
88
92
|
MessageWrapper={MessageWrapper}
|
|
@@ -90,7 +94,14 @@ export const Chat = ({
|
|
|
90
94
|
/>
|
|
91
95
|
)
|
|
92
96
|
},
|
|
93
|
-
[
|
|
97
|
+
[
|
|
98
|
+
lastBotMessageId,
|
|
99
|
+
colorScheme,
|
|
100
|
+
isInputDisabled,
|
|
101
|
+
chatbotVariant,
|
|
102
|
+
isTextToSpeechEnabled,
|
|
103
|
+
shouldWrapMessage,
|
|
104
|
+
],
|
|
94
105
|
)
|
|
95
106
|
|
|
96
107
|
const listHeader = useMemo(
|
|
@@ -102,6 +113,8 @@ export const Chat = ({
|
|
|
102
113
|
[isHelpRequestPending, messages],
|
|
103
114
|
)
|
|
104
115
|
|
|
116
|
+
const floatingAvatarVariant = getChatbotAvatarVariant(chatbotVariant, isHelpRequestPending)
|
|
117
|
+
|
|
105
118
|
useEffect(() => {
|
|
106
119
|
scrollToBottom()
|
|
107
120
|
}, [messages.length])
|
|
@@ -137,7 +150,11 @@ export const Chat = ({
|
|
|
137
150
|
<FadeOverlays fadeRef={fadeRef} />
|
|
138
151
|
</View>
|
|
139
152
|
|
|
140
|
-
{!isScrolledUp && !isInputDisabled &&
|
|
153
|
+
{!isScrolledUp && !isInputDisabled && (
|
|
154
|
+
<View testID={TEST_IDS.CHAT_ICON} style={styles.floatingAvatar} pointerEvents="box-none">
|
|
155
|
+
<ChatbotAvatar variant={floatingAvatarVariant} />
|
|
156
|
+
</View>
|
|
157
|
+
)}
|
|
141
158
|
|
|
142
159
|
<ChatInputBlock
|
|
143
160
|
isHintFeedback={isHintFeedback}
|
|
@@ -167,10 +184,15 @@ const styles = StyleSheet.create({
|
|
|
167
184
|
alignSelf: 'stretch',
|
|
168
185
|
},
|
|
169
186
|
list: {
|
|
170
|
-
paddingTop:
|
|
187
|
+
paddingTop: SPACING['400'],
|
|
171
188
|
paddingBottom: 3,
|
|
172
189
|
},
|
|
173
190
|
separator: {
|
|
174
191
|
height: SPACING['200'],
|
|
175
192
|
},
|
|
193
|
+
floatingAvatar: {
|
|
194
|
+
position: 'absolute',
|
|
195
|
+
bottom: FLOATING_AVATAR_BOTTOM,
|
|
196
|
+
left: 0,
|
|
197
|
+
},
|
|
176
198
|
})
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { ComponentType } from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
|
|
4
|
+
import { ExcitedLavaIcon, LavaIcon, LavaIconInGlasses } from '../../../../shared/icons'
|
|
5
|
+
import { AI_ICON_SIZE, ChatbotAvatarVariant, LAVA_ICON_SIZE } from '../../constants'
|
|
6
|
+
import { AvatarProps } from '../../types/chat.types'
|
|
7
|
+
import { AIAvatar } from './AIAvatar'
|
|
8
|
+
|
|
9
|
+
const AVATAR_BY_VARIANT: Record<ChatbotAvatarVariant, ComponentType<AvatarProps>> = {
|
|
10
|
+
[ChatbotAvatarVariant.AI]: AIAvatar,
|
|
11
|
+
[ChatbotAvatarVariant.LAVA]: LavaIcon,
|
|
12
|
+
[ChatbotAvatarVariant.THINKING_LAVA]: LavaIconInGlasses,
|
|
13
|
+
[ChatbotAvatarVariant.EXCITED_LAVA]: ExcitedLavaIcon,
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const DEFAULT_SIZE_BY_VARIANT: Record<ChatbotAvatarVariant, number> = {
|
|
17
|
+
[ChatbotAvatarVariant.AI]: AI_ICON_SIZE,
|
|
18
|
+
[ChatbotAvatarVariant.LAVA]: LAVA_ICON_SIZE,
|
|
19
|
+
[ChatbotAvatarVariant.THINKING_LAVA]: LAVA_ICON_SIZE,
|
|
20
|
+
[ChatbotAvatarVariant.EXCITED_LAVA]: LAVA_ICON_SIZE,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type ChatbotAvatarProps = AvatarProps & {
|
|
24
|
+
variant?: ChatbotAvatarVariant
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const ChatbotAvatar = ({
|
|
28
|
+
variant = ChatbotAvatarVariant.LAVA,
|
|
29
|
+
size,
|
|
30
|
+
}: ChatbotAvatarProps) => {
|
|
31
|
+
const Avatar = AVATAR_BY_VARIANT[variant]
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<View style={[variant === ChatbotAvatarVariant.AI && styles.aiAvatarContainer]}>
|
|
35
|
+
<Avatar size={size ?? DEFAULT_SIZE_BY_VARIANT[variant]} />
|
|
36
|
+
</View>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const styles = StyleSheet.create({
|
|
41
|
+
aiAvatarContainer: {
|
|
42
|
+
paddingLeft: 3,
|
|
43
|
+
},
|
|
44
|
+
})
|
|
@@ -7,6 +7,7 @@ import { AnimatedMessage } from '../ChatMessage/AnimatedMessage'
|
|
|
7
7
|
import { ChatMessage } from '../ChatMessage/ChatMessage'
|
|
8
8
|
import { MessageVariant } from '../../types/model.types'
|
|
9
9
|
import { ColorScheme } from '../../types/style.types'
|
|
10
|
+
import { ChatbotVariant } from '../../constants'
|
|
10
11
|
import { ConditionalWrapper } from '../../../../lib/components/ConditionalWrapper'
|
|
11
12
|
import { TTSHighlightRenderer } from '../../types/t2s.types'
|
|
12
13
|
import { useChatModel } from '../../context/ChatBotModelContext'
|
|
@@ -16,6 +17,7 @@ type MessageItemProps = {
|
|
|
16
17
|
withIcon: boolean
|
|
17
18
|
colorScheme: ColorScheme
|
|
18
19
|
isInputDisabled?: boolean
|
|
20
|
+
chatbotVariant?: ChatbotVariant
|
|
19
21
|
isTextToSpeechEnabled: boolean
|
|
20
22
|
shouldWrapMessage: boolean
|
|
21
23
|
MessageWrapper?: ComponentType<PropsWithChildren>
|
|
@@ -27,6 +29,7 @@ export const MessageItem = ({
|
|
|
27
29
|
withIcon,
|
|
28
30
|
colorScheme,
|
|
29
31
|
isInputDisabled,
|
|
32
|
+
chatbotVariant,
|
|
30
33
|
isTextToSpeechEnabled,
|
|
31
34
|
shouldWrapMessage,
|
|
32
35
|
MessageWrapper,
|
|
@@ -51,6 +54,7 @@ export const MessageItem = ({
|
|
|
51
54
|
<ConditionalWrapper withWrapper={shouldWrapMessage} Wrapper={MessageWrapper}>
|
|
52
55
|
<ChatMessage
|
|
53
56
|
withIcon={withIcon}
|
|
57
|
+
chatbotVariant={chatbotVariant}
|
|
54
58
|
isTranslated={isTranslated}
|
|
55
59
|
message={message}
|
|
56
60
|
variant={message.isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED}
|
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Button, ButtonColor, ButtonSize, ButtonVariant } from '@magmamath/react-native-ui'
|
|
1
|
+
import React, { ComponentType, PropsWithChildren } from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { TEST_IDS } from '@magmamath/students-qa'
|
|
4
|
+
import { Button, ButtonColor, ButtonSize, ButtonVariant, SPACING } from '@magmamath/react-native-ui'
|
|
5
5
|
import { useUnit } from 'effector-react'
|
|
6
|
+
|
|
6
7
|
import { ChatbotModel } from '../../model/ChatBotModel'
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { ChatbotVariant } from '../../constants'
|
|
9
|
+
import { ChatLauncher } from './ChatLauncher'
|
|
9
10
|
|
|
10
11
|
type ChatControlsProps = {
|
|
11
12
|
model: ChatbotModel
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
onPressChatLauncher: () => void
|
|
14
|
+
onPressQuickAction?: () => void
|
|
15
|
+
withQuickActionButton?: boolean
|
|
15
16
|
ButtonWrapper?: ComponentType<PropsWithChildren>
|
|
16
|
-
|
|
17
|
+
chatbotIconSize?: number
|
|
18
|
+
chatbotVariant?: ChatbotVariant
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export const ChatControls = ({
|
|
20
22
|
model,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
onPressChatLauncher,
|
|
24
|
+
onPressQuickAction,
|
|
25
|
+
withQuickActionButton = false,
|
|
24
26
|
ButtonWrapper = React.Fragment,
|
|
25
|
-
|
|
27
|
+
chatbotIconSize = 70,
|
|
28
|
+
chatbotVariant = ChatbotVariant.LAVA,
|
|
26
29
|
}: ChatControlsProps) => {
|
|
27
30
|
const isOpen = useUnit(model.$isOpen)
|
|
28
31
|
const isTranslated = useUnit(model.translation.$isTranslated)
|
|
@@ -36,22 +39,24 @@ export const ChatControls = ({
|
|
|
36
39
|
<View style={styles.container}>
|
|
37
40
|
<ButtonWrapper>
|
|
38
41
|
<View style={styles.buttonsRow}>
|
|
39
|
-
{
|
|
42
|
+
{withQuickActionButton && (
|
|
40
43
|
<Button
|
|
41
44
|
variant={ButtonVariant.PRIMARY}
|
|
42
45
|
colorScheme={ButtonColor.WHITE}
|
|
43
46
|
size={ButtonSize.MEDIUM}
|
|
44
|
-
|
|
45
|
-
onPress={onPressHelpButton}
|
|
47
|
+
onPress={onPressQuickAction}
|
|
46
48
|
style={{ text: styles.helpButtonText }}
|
|
47
49
|
testID={TEST_IDS.CHAT_GET_A_HINT_BUTTON}
|
|
48
50
|
>
|
|
49
51
|
{(isTranslated && getHint.translatedText) || getHint.text}
|
|
50
52
|
</Button>
|
|
51
53
|
)}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
|
|
55
|
+
<ChatLauncher
|
|
56
|
+
onPress={onPressChatLauncher}
|
|
57
|
+
iconSize={chatbotIconSize}
|
|
58
|
+
variant={chatbotVariant}
|
|
59
|
+
/>
|
|
55
60
|
</View>
|
|
56
61
|
</ButtonWrapper>
|
|
57
62
|
</View>
|
|
@@ -70,7 +75,7 @@ const styles = StyleSheet.create({
|
|
|
70
75
|
buttonsRow: {
|
|
71
76
|
flexDirection: 'row',
|
|
72
77
|
alignItems: 'flex-end',
|
|
73
|
-
gap:
|
|
78
|
+
gap: SPACING['200'],
|
|
74
79
|
},
|
|
75
80
|
helpButtonText: {
|
|
76
81
|
textTransform: 'uppercase',
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Pressable } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
ButtonColor,
|
|
6
|
+
ButtonSize,
|
|
7
|
+
ButtonVariant,
|
|
8
|
+
COLORS,
|
|
9
|
+
SparkIcon,
|
|
10
|
+
} from '@magmamath/react-native-ui'
|
|
11
|
+
import { LavaIcon } from '../../../../shared/icons'
|
|
12
|
+
import { ChatbotVariant } from '../../constants'
|
|
13
|
+
|
|
14
|
+
type ChatLauncherProps = {
|
|
15
|
+
onPress: () => void
|
|
16
|
+
variant?: ChatbotVariant
|
|
17
|
+
iconSize?: number
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const ChatLauncher = ({
|
|
21
|
+
onPress,
|
|
22
|
+
variant,
|
|
23
|
+
iconSize = 20,
|
|
24
|
+
}: ChatLauncherProps) => {
|
|
25
|
+
if (variant === ChatbotVariant.AI) {
|
|
26
|
+
return (
|
|
27
|
+
<Button
|
|
28
|
+
variant={ButtonVariant.PRIMARY}
|
|
29
|
+
colorScheme={ButtonColor.WHITE}
|
|
30
|
+
size={ButtonSize.LARGE}
|
|
31
|
+
raiseLevel={3}
|
|
32
|
+
onPress={onPress}
|
|
33
|
+
icon={<SparkIcon color={COLORS.PRIMARY_ORANGE} size={iconSize} />}
|
|
34
|
+
accessibilityRole="button"
|
|
35
|
+
/>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Pressable onPress={onPress} accessibilityRole="button">
|
|
41
|
+
<LavaIcon size={iconSize} />
|
|
42
|
+
</Pressable>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
@@ -6,6 +6,7 @@ import { TTSHighlightRenderer, T2SState } from '../../types/t2s.types'
|
|
|
6
6
|
import { MessageVariant } from '../../types/model.types'
|
|
7
7
|
import { ConversationMessage } from '../../types/units.types'
|
|
8
8
|
import { ColorScheme } from '../../types/style.types'
|
|
9
|
+
import { ChatbotVariant } from '../../constants'
|
|
9
10
|
|
|
10
11
|
type ChatMessageProps = {
|
|
11
12
|
variant: MessageVariant
|
|
@@ -17,6 +18,7 @@ type ChatMessageProps = {
|
|
|
17
18
|
highlightedWordIndex?: number
|
|
18
19
|
TTSHighlightRenderer?: TTSHighlightRenderer
|
|
19
20
|
withIcon?: boolean
|
|
21
|
+
chatbotVariant?: ChatbotVariant
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export type VariantProps = Omit<ChatMessageProps, 'variant'>
|