@magmamath/students-features 1.3.26-rc.3 → 1.3.26-rc.4
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/fluency/components/Fluency.js +15 -32
- package/dist/commonjs/features/fluency/components/Fluency.js.map +1 -1
- package/dist/commonjs/features/fluency/components/FluencySolving.js +29 -9
- package/dist/commonjs/features/fluency/components/FluencySolving.js.map +1 -1
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js +17 -18
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -1
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js +26 -24
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/{EquationContent.js → components/EquationContent.js} +5 -5
- package/dist/commonjs/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/{FluencyEquationCard.js → components/FluencyEquationCard.js} +16 -8
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyNumpad.js +62 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyNumpad.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/{FluencySolvingCard.js → components/FluencySolvingCard.js} +40 -22
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingCard.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/{FluencySolvingHeader.js → components/FluencySolvingHeader.js} +6 -8
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/{FluencySolvingProgress.js → components/FluencySolvingProgress.js} +32 -4
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.constants.js +29 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.constants.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.js +58 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.types.js +2 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.types.js.map +1 -0
- package/dist/commonjs/features/fluency/components/matrix/FluencyMatrix.js +2 -2
- package/dist/commonjs/features/fluency/components/matrix/FluencyMatrix.js.map +1 -1
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixCell.js +41 -12
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixCell.js.map +1 -1
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js +16 -26
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js.map +1 -1
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js +4 -8
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -1
- package/dist/commonjs/features/fluency/components/mobile-menu/MobileMenu.js +38 -0
- package/dist/commonjs/features/fluency/components/mobile-menu/MobileMenu.js.map +1 -0
- package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js +6 -3
- package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -1
- package/dist/commonjs/features/fluency/components/session-results/FluencySessionResults.js +178 -0
- package/dist/commonjs/features/fluency/components/session-results/FluencySessionResults.js.map +1 -0
- package/dist/commonjs/features/fluency/components/session-results/SessionStatCard.js +99 -0
- package/dist/commonjs/features/fluency/components/session-results/SessionStatCard.js.map +1 -0
- package/dist/commonjs/features/fluency/components/session-results/SkillProgressionRow.js +113 -0
- package/dist/commonjs/features/fluency/components/session-results/SkillProgressionRow.js.map +1 -0
- package/dist/commonjs/features/fluency/fluency.constants.js +14 -6
- package/dist/commonjs/features/fluency/fluency.constants.js.map +1 -1
- package/dist/commonjs/features/fluency/fluency.helpers.js +53 -25
- package/dist/commonjs/features/fluency/fluency.helpers.js.map +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js +16 -7
- package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js.map +1 -1
- package/dist/commonjs/features/fluency/{components/fluency-solving/FluencyNumpad.js → hooks/useFluencyNumpad.js} +58 -82
- package/dist/commonjs/features/fluency/hooks/useFluencyNumpad.js.map +1 -0
- package/dist/commonjs/features/fluency/hooks/useSuccessSound.js +0 -2
- package/dist/commonjs/features/fluency/hooks/useSuccessSound.js.map +1 -1
- package/dist/commonjs/features/fluency/model/FluencyApiModel.js +6 -1
- package/dist/commonjs/features/fluency/model/FluencyApiModel.js.map +1 -1
- package/dist/commonjs/features/fluency/model/FluencyDaysStreakModel.js +8 -1
- package/dist/commonjs/features/fluency/model/FluencyDaysStreakModel.js.map +1 -1
- package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js +16 -1
- package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js.map +1 -1
- package/dist/commonjs/features/fluency/model/FluencyModel.js +12 -28
- package/dist/commonjs/features/fluency/model/FluencyModel.js.map +1 -1
- package/dist/commonjs/features/fluency/model/FluencySolvingModel.js +57 -5
- package/dist/commonjs/features/fluency/model/FluencySolvingModel.js.map +1 -1
- package/dist/commonjs/lib/constants.js +1 -0
- package/dist/commonjs/lib/constants.js.map +1 -1
- package/dist/module/features/fluency/components/Fluency.js +17 -34
- package/dist/module/features/fluency/components/Fluency.js.map +1 -1
- package/dist/module/features/fluency/components/FluencySolving.js +29 -9
- package/dist/module/features/fluency/components/FluencySolving.js.map +1 -1
- package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js +17 -18
- package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -1
- package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js +26 -24
- package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/{EquationContent.js → components/EquationContent.js} +5 -5
- package/dist/module/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/{FluencyEquationCard.js → components/FluencyEquationCard.js} +16 -8
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyNumpad.js +56 -0
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyNumpad.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.js +84 -0
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/{FluencySolvingHeader.js → components/FluencySolvingHeader.js} +6 -8
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js +69 -0
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.constants.js +25 -0
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.constants.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.helpers.js +52 -0
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.helpers.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.types.js +2 -0
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.types.js.map +1 -0
- package/dist/module/features/fluency/components/matrix/FluencyMatrix.js +2 -2
- package/dist/module/features/fluency/components/matrix/FluencyMatrix.js.map +1 -1
- package/dist/module/features/fluency/components/matrix/components/MatrixCell.js +44 -15
- package/dist/module/features/fluency/components/matrix/components/MatrixCell.js.map +1 -1
- package/dist/module/features/fluency/components/matrix/components/MatrixFill.js +16 -26
- package/dist/module/features/fluency/components/matrix/components/MatrixFill.js.map +1 -1
- package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js +4 -8
- package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -1
- package/dist/module/features/fluency/components/mobile-menu/MobileMenu.js +32 -0
- package/dist/module/features/fluency/components/mobile-menu/MobileMenu.js.map +1 -0
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js +6 -3
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -1
- package/dist/module/features/fluency/components/session-results/FluencySessionResults.js +172 -0
- package/dist/module/features/fluency/components/session-results/FluencySessionResults.js.map +1 -0
- package/dist/module/features/fluency/components/session-results/SessionStatCard.js +93 -0
- package/dist/module/features/fluency/components/session-results/SessionStatCard.js.map +1 -0
- package/dist/module/features/fluency/components/session-results/SkillProgressionRow.js +107 -0
- package/dist/module/features/fluency/components/session-results/SkillProgressionRow.js.map +1 -0
- package/dist/module/features/fluency/fluency.constants.js +13 -5
- package/dist/module/features/fluency/fluency.constants.js.map +1 -1
- package/dist/module/features/fluency/fluency.helpers.js +51 -21
- package/dist/module/features/fluency/fluency.helpers.js.map +1 -1
- package/dist/module/features/fluency/hooks/useFluencyModePreset.js +16 -7
- package/dist/module/features/fluency/hooks/useFluencyModePreset.js.map +1 -1
- package/dist/module/features/fluency/{components/fluency-solving/FluencyNumpad.js → hooks/useFluencyNumpad.js} +58 -82
- package/dist/module/features/fluency/hooks/useFluencyNumpad.js.map +1 -0
- package/dist/module/features/fluency/hooks/useSuccessSound.js +0 -1
- package/dist/module/features/fluency/hooks/useSuccessSound.js.map +1 -1
- package/dist/module/features/fluency/model/FluencyApiModel.js +6 -1
- package/dist/module/features/fluency/model/FluencyApiModel.js.map +1 -1
- package/dist/module/features/fluency/model/FluencyDaysStreakModel.js +8 -1
- package/dist/module/features/fluency/model/FluencyDaysStreakModel.js.map +1 -1
- package/dist/module/features/fluency/model/FluencyMatrixModel.js +16 -1
- package/dist/module/features/fluency/model/FluencyMatrixModel.js.map +1 -1
- package/dist/module/features/fluency/model/FluencyModel.js +13 -29
- package/dist/module/features/fluency/model/FluencyModel.js.map +1 -1
- package/dist/module/features/fluency/model/FluencySolvingModel.js +58 -6
- package/dist/module/features/fluency/model/FluencySolvingModel.js.map +1 -1
- package/dist/module/lib/constants.js +1 -0
- package/dist/module/lib/constants.js.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts +2 -1
- package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/FluencySolving.d.ts +2 -1
- package/dist/typescript/commonjs/features/fluency/components/FluencySolving.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts +5 -3
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -0
- package/dist/typescript/{module/features/fluency/components/fluency-solving → commonjs/features/fluency/components/fluency-solving/components}/FluencyEquationCard.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyNumpad.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.d.ts +10 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.constants.d.ts +5 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts +15 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.types.d.ts +20 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/FluencyMatrix.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts +5 -7
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixFill.d.ts +1 -1
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/mobile-menu/MobileMenu.d.ts +7 -0
- package/dist/typescript/commonjs/features/fluency/components/mobile-menu/MobileMenu.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/components/session-results/FluencySessionResults.d.ts +11 -0
- package/dist/typescript/commonjs/features/fluency/components/session-results/FluencySessionResults.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/session-results/SessionStatCard.d.ts +9 -0
- package/dist/typescript/commonjs/features/fluency/components/session-results/SessionStatCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/session-results/SkillProgressionRow.d.ts +15 -0
- package/dist/typescript/commonjs/features/fluency/components/session-results/SkillProgressionRow.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts +12 -5
- package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts +3 -5
- package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts +58 -8
- package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts +22 -3
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyNumpad.d.ts +53 -0
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyNumpad.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/hooks/useSuccessSound.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts +6 -3
- package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts +5 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts +9 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts +3 -15
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts +20 -7
- package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/constants.d.ts +2 -1
- package/dist/typescript/commonjs/lib/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/Fluency.d.ts +2 -1
- package/dist/typescript/module/features/fluency/components/Fluency.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/FluencySolving.d.ts +2 -1
- package/dist/typescript/module/features/fluency/components/FluencySolving.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts +5 -3
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -0
- package/dist/typescript/{commonjs/features/fluency/components/fluency-solving → module/features/fluency/components/fluency-solving/components}/FluencyEquationCard.d.ts +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyNumpad.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.d.ts +10 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.constants.d.ts +5 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.constants.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts +15 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.types.d.ts +20 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.types.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/matrix/FluencyMatrix.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts +5 -7
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixFill.d.ts +1 -1
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/mobile-menu/MobileMenu.d.ts +7 -0
- package/dist/typescript/module/features/fluency/components/mobile-menu/MobileMenu.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/components/session-results/FluencySessionResults.d.ts +11 -0
- package/dist/typescript/module/features/fluency/components/session-results/FluencySessionResults.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/session-results/SessionStatCard.d.ts +9 -0
- package/dist/typescript/module/features/fluency/components/session-results/SessionStatCard.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/session-results/SkillProgressionRow.d.ts +15 -0
- package/dist/typescript/module/features/fluency/components/session-results/SkillProgressionRow.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/fluency.constants.d.ts +12 -5
- package/dist/typescript/module/features/fluency/fluency.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/fluency.helpers.d.ts +3 -5
- package/dist/typescript/module/features/fluency/fluency.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/fluency.types.d.ts +58 -8
- package/dist/typescript/module/features/fluency/fluency.types.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts +22 -3
- package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/hooks/useFluencyNumpad.d.ts +53 -0
- package/dist/typescript/module/features/fluency/hooks/useFluencyNumpad.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/hooks/useSuccessSound.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts +6 -3
- package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts +5 -0
- package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts +9 -0
- package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts +3 -15
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts +20 -7
- package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts.map +1 -1
- package/dist/typescript/module/lib/constants.d.ts +2 -1
- package/dist/typescript/module/lib/constants.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/fluency/components/Fluency.tsx +17 -41
- package/src/features/fluency/components/FluencySolving.tsx +30 -5
- package/src/features/fluency/components/day-streak-counter/DayStreak.tsx +24 -20
- package/src/features/fluency/components/day-streak-counter/DayStreakCounter.tsx +41 -28
- package/src/features/fluency/components/fluency-solving/{EquationContent.tsx → components/EquationContent.tsx} +5 -5
- package/src/features/fluency/components/fluency-solving/{FluencyEquationCard.tsx → components/FluencyEquationCard.tsx} +12 -6
- package/src/features/fluency/components/fluency-solving/components/FluencyNumpad.tsx +54 -0
- package/src/features/fluency/components/fluency-solving/components/FluencySolvingCard.tsx +84 -0
- package/src/features/fluency/components/fluency-solving/{FluencySolvingHeader.tsx → components/FluencySolvingHeader.tsx} +6 -8
- package/src/features/fluency/components/fluency-solving/components/FluencySolvingProgress.tsx +68 -0
- package/src/features/fluency/components/fluency-solving/fluencySolving.constants.ts +25 -0
- package/src/features/fluency/components/fluency-solving/fluencySolving.helpers.ts +78 -0
- package/src/features/fluency/components/fluency-solving/fluencySolving.types.ts +21 -0
- package/src/features/fluency/components/matrix/FluencyMatrix.tsx +3 -2
- package/src/features/fluency/components/matrix/components/MatrixCell.tsx +46 -23
- package/src/features/fluency/components/matrix/components/MatrixFill.tsx +14 -24
- package/src/features/fluency/components/matrix/components/MatrixLegend.tsx +4 -4
- package/src/features/fluency/components/mobile-menu/MobileMenu.tsx +29 -0
- package/src/features/fluency/components/select-math-operator/SelectMathOperator.tsx +7 -3
- package/src/features/fluency/components/session-results/FluencySessionResults.tsx +204 -0
- package/src/features/fluency/components/session-results/SessionStatCard.tsx +100 -0
- package/src/features/fluency/components/session-results/SkillProgressionRow.tsx +100 -0
- package/src/features/fluency/fluency.constants.ts +13 -5
- package/src/features/fluency/fluency.helpers.ts +46 -27
- package/src/features/fluency/fluency.types.ts +70 -8
- package/src/features/fluency/hooks/useFluencyModePreset.ts +30 -20
- package/src/features/fluency/{components/fluency-solving/FluencyNumpad.tsx → hooks/useFluencyNumpad.tsx} +68 -94
- package/src/features/fluency/hooks/useSuccessSound.ts +0 -1
- package/src/features/fluency/model/FluencyApiModel.ts +18 -2
- package/src/features/fluency/model/FluencyDaysStreakModel.ts +11 -1
- package/src/features/fluency/model/FluencyMatrixModel.ts +20 -1
- package/src/features/fluency/model/FluencyModel.ts +15 -30
- package/src/features/fluency/model/FluencySolvingModel.ts +70 -8
- package/src/lib/constants.ts +3 -2
- package/src/types/types.d.ts +5 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/EquationContent.js.map +0 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.js.map +0 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.js.map +0 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.js.map +0 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.js.map +0 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.js.map +0 -1
- package/dist/commonjs/features/fluency/model/FluencyInputModel.js +0 -20
- package/dist/commonjs/features/fluency/model/FluencyInputModel.js.map +0 -1
- package/dist/module/features/fluency/components/fluency-solving/EquationContent.js.map +0 -1
- package/dist/module/features/fluency/components/fluency-solving/FluencyEquationCard.js.map +0 -1
- package/dist/module/features/fluency/components/fluency-solving/FluencyNumpad.js.map +0 -1
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingCard.js +0 -66
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingCard.js.map +0 -1
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingHeader.js.map +0 -1
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingProgress.js +0 -41
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingProgress.js.map +0 -1
- package/dist/module/features/fluency/model/FluencyInputModel.js +0 -15
- package/dist/module/features/fluency/model/FluencyInputModel.js.map +0 -1
- package/dist/typescript/commonjs/features/fluency/__tests__/FluencyModel.test.d.ts +0 -2
- package/dist/typescript/commonjs/features/fluency/__tests__/FluencyModel.test.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/EquationContent.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts +0 -8
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyInputModel.d.ts +0 -11
- package/dist/typescript/commonjs/features/fluency/model/FluencyInputModel.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/__tests__/FluencyModel.test.d.ts +0 -2
- package/dist/typescript/module/features/fluency/__tests__/FluencyModel.test.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/EquationContent.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyNumpad.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts +0 -8
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/model/FluencyInputModel.d.ts +0 -11
- package/dist/typescript/module/features/fluency/model/FluencyInputModel.d.ts.map +0 -1
- package/src/features/fluency/__tests__/FluencyModel.test.ts +0 -28
- package/src/features/fluency/components/fluency-solving/FluencySolvingCard.tsx +0 -59
- package/src/features/fluency/components/fluency-solving/FluencySolvingProgress.tsx +0 -40
- package/src/features/fluency/model/FluencyInputModel.ts +0 -17
- /package/dist/typescript/commonjs/features/fluency/components/fluency-solving/{EquationContent.d.ts → components/EquationContent.d.ts} +0 -0
- /package/dist/typescript/commonjs/features/fluency/components/fluency-solving/{FluencyNumpad.d.ts → components/FluencyNumpad.d.ts} +0 -0
- /package/dist/typescript/commonjs/features/fluency/components/fluency-solving/{FluencySolvingCard.d.ts → components/FluencySolvingCard.d.ts} +0 -0
- /package/dist/typescript/commonjs/features/fluency/components/fluency-solving/{FluencySolvingHeader.d.ts → components/FluencySolvingHeader.d.ts} +0 -0
- /package/dist/typescript/module/features/fluency/components/fluency-solving/{EquationContent.d.ts → components/EquationContent.d.ts} +0 -0
- /package/dist/typescript/module/features/fluency/components/fluency-solving/{FluencyNumpad.d.ts → components/FluencyNumpad.d.ts} +0 -0
- /package/dist/typescript/module/features/fluency/components/fluency-solving/{FluencySolvingCard.d.ts → components/FluencySolvingCard.d.ts} +0 -0
- /package/dist/typescript/module/features/fluency/components/fluency-solving/{FluencySolvingHeader.d.ts → components/FluencySolvingHeader.d.ts} +0 -0
package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useRef } from 'react';
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
|
+
import { SPACING } from '@magmamath/react-native-ui';
|
|
6
|
+
import { useUnit } from 'effector-react/effector-react.mjs';
|
|
7
|
+
import { FluencyNumpad } from "./FluencyNumpad.js";
|
|
8
|
+
import { FluencyEquationCard } from "./FluencyEquationCard.js";
|
|
9
|
+
import { useFluency } from "../../../context/FluencyContext.js";
|
|
10
|
+
import { useCardSnapAnimation } from "../../../hooks/useCardSnapAnimation.js";
|
|
11
|
+
import { useSuccessSound } from "../../../hooks/useSuccessSound.js";
|
|
12
|
+
import { isWeb } from "../../../../../shared/common.constants.js";
|
|
13
|
+
import { KeyboardKeys } from "../../../../../lib/constants.js";
|
|
14
|
+
import { MAX_INPUT_LENGTH } from "../../../fluency.constants.js";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
export const FluencySolvingCard = () => {
|
|
17
|
+
const {
|
|
18
|
+
model
|
|
19
|
+
} = useFluency();
|
|
20
|
+
const {
|
|
21
|
+
answer,
|
|
22
|
+
fact
|
|
23
|
+
} = useUnit({
|
|
24
|
+
answer: model.solving.$answer,
|
|
25
|
+
fact: model.solving.$current
|
|
26
|
+
});
|
|
27
|
+
const animation = useCardSnapAnimation();
|
|
28
|
+
const successSound = useSuccessSound();
|
|
29
|
+
const answerRef = useRef(answer);
|
|
30
|
+
const submitRef = useRef(() => {});
|
|
31
|
+
answerRef.current = answer;
|
|
32
|
+
const submit = () => {
|
|
33
|
+
if (!fact) return;
|
|
34
|
+
const isCorrect = answerRef.current !== null && answerRef.current === fact.answer;
|
|
35
|
+
if (isCorrect) {
|
|
36
|
+
successSound.play();
|
|
37
|
+
animation.trigger('right');
|
|
38
|
+
} else {
|
|
39
|
+
animation.trigger('left');
|
|
40
|
+
}
|
|
41
|
+
model.solving.submit();
|
|
42
|
+
};
|
|
43
|
+
submitRef.current = submit;
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (!isWeb) return;
|
|
46
|
+
const handleKeyDown = event => {
|
|
47
|
+
const isDigit = /^\d$/.test(event.key);
|
|
48
|
+
if (isDigit) {
|
|
49
|
+
const currentStr = answerRef.current !== null ? answerRef.current.toString() : '';
|
|
50
|
+
if (currentStr.length >= MAX_INPUT_LENGTH) return;
|
|
51
|
+
model.solving.setAnswer(parseInt(currentStr + event.key, 10));
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (event.key === KeyboardKeys.BACKSPACE) {
|
|
55
|
+
const currentStr = answerRef.current !== null ? answerRef.current.toString() : '';
|
|
56
|
+
const newStr = currentStr.slice(0, -1);
|
|
57
|
+
model.solving.setAnswer(newStr ? parseInt(newStr, 10) : null);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (event.key === KeyboardKeys.ENTER) submitRef.current();
|
|
61
|
+
};
|
|
62
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
63
|
+
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
64
|
+
}, []);
|
|
65
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
66
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
67
|
+
style: styles.wrapper,
|
|
68
|
+
children: /*#__PURE__*/_jsx(FluencyEquationCard, {
|
|
69
|
+
animationStyles: animation.snapStyles
|
|
70
|
+
})
|
|
71
|
+
}), /*#__PURE__*/_jsx(FluencyNumpad, {
|
|
72
|
+
onEnterPress: submit
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
wrapper: {
|
|
78
|
+
alignItems: 'center',
|
|
79
|
+
paddingVertical: SPACING[400],
|
|
80
|
+
paddingHorizontal: SPACING[600],
|
|
81
|
+
marginTop: SPACING[300]
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=FluencySolvingCard.js.map
|
package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","View","StyleSheet","SPACING","useUnit","FluencyNumpad","FluencyEquationCard","useFluency","useCardSnapAnimation","useSuccessSound","isWeb","KeyboardKeys","MAX_INPUT_LENGTH","jsx","_jsx","jsxs","_jsxs","FluencySolvingCard","model","answer","fact","solving","$answer","$current","animation","successSound","answerRef","submitRef","current","submit","isCorrect","play","trigger","handleKeyDown","event","isDigit","test","key","currentStr","toString","length","setAnswer","parseInt","BACKSPACE","newStr","slice","ENTER","window","addEventListener","removeEventListener","children","style","styles","wrapper","animationStyles","snapStyles","onEnterPress","create","alignItems","paddingVertical","paddingHorizontal","marginTop"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/fluency-solving/components/FluencySolvingCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,4BAA4B;AACpD,SAASC,OAAO,QAAQ,mCAAmC;AAC3D,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,UAAU,QAAQ,oCAAiC;AAC5D,SAASC,oBAAoB,QAAQ,wCAAqC;AAC1E,SAASC,eAAe,QAAQ,mCAAgC;AAChE,SAASC,KAAK,QAAQ,2CAAwC;AAC9D,SAASC,YAAY,QAAQ,iCAA8B;AAC3D,SAASC,gBAAgB,QAAQ,+BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE7D,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAM;IAAEC;EAAM,CAAC,GAAGX,UAAU,CAAC,CAAC;EAC9B,MAAM;IAAEY,MAAM;IAAEC;EAAK,CAAC,GAAGhB,OAAO,CAAC;IAC/Be,MAAM,EAAED,KAAK,CAACG,OAAO,CAACC,OAAO;I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,EAAE1D,OAAO,CAAC,GAAG;EACxB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View, StyleSheet } from 'react-native';
|
|
5
5
|
import { BORDER_RADIUS, Button, ButtonSize, ButtonVariant, COLORS, HeadingVariants, SHADOWS, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { XCloseIcon } from "../../../../shared/icons/XCloseIcon.js";
|
|
6
|
+
import { useFluencyModePreset } from "../../../hooks/useFluencyModePreset.js";
|
|
7
|
+
import { XCloseIcon } from "../../../../../shared/icons/XCloseIcon.js";
|
|
9
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
9
|
export const FluencySolvingHeader = ({
|
|
11
10
|
onClosePress
|
|
12
11
|
}) => {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const OperatorIcon = uiMode.operatorIcon;
|
|
12
|
+
const modePreset = useFluencyModePreset();
|
|
13
|
+
const OperatorIcon = modePreset.icon;
|
|
16
14
|
return /*#__PURE__*/_jsxs(View, {
|
|
17
15
|
style: styles.container,
|
|
18
16
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
@@ -22,7 +20,7 @@ export const FluencySolvingHeader = ({
|
|
|
22
20
|
onPress: onClosePress
|
|
23
21
|
}), /*#__PURE__*/_jsx(View, {
|
|
24
22
|
style: [styles.operatorBadge, {
|
|
25
|
-
backgroundColor:
|
|
23
|
+
backgroundColor: modePreset.colors.accent
|
|
26
24
|
}],
|
|
27
25
|
children: /*#__PURE__*/_jsx(OperatorIcon, {
|
|
28
26
|
color: COLORS.NEUTRAL_1,
|
|
@@ -31,7 +29,7 @@ export const FluencySolvingHeader = ({
|
|
|
31
29
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
32
30
|
variant: HeadingVariants.H4,
|
|
33
31
|
style: styles.title,
|
|
34
|
-
children:
|
|
32
|
+
children: modePreset.label
|
|
35
33
|
})]
|
|
36
34
|
});
|
|
37
35
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","BORDER_RADIUS","Button","ButtonSize","ButtonVariant","COLORS","HeadingVariants","SHADOWS","SPACING","Typography","useFluencyModePreset","XCloseIcon","jsx","_jsx","jsxs","_jsxs","FluencySolvingHeader","onClosePress","modePreset","OperatorIcon","icon","style","styles","container","children","variant","SECONDARY","size","LARGE","onPress","operatorBadge","backgroundColor","colors","accent","color","NEUTRAL_1","H4","title","label","create","height","flexDirection","alignItems","gap","paddingVertical","paddingHorizontal","width","borderRadius","justifyContent","NEUTRAL_10","fontWeight"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/fluency-solving/components/FluencySolvingHeader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SACEC,aAAa,EACbC,MAAM,EACNC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,eAAe,EACfC,OAAO,EACPC,OAAO,EACPC,UAAU,QACL,4BAA4B;AACnC,SAASC,oBAAoB,QAAQ,wCAAqC;AAC1E,SAASC,UAAU,QAAQ,2CAAwC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMnE,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EAAEC;AAAwC,CAAC,KAAK;EACnF,MAAMC,UAAU,GAAGR,oBAAoB,CAAC,CAAC;EACzC,MAAMS,YAAY,GAAGD,UAAU,CAACE,IAAI;EAEpC,oBACEL,KAAA,CAAChB,IAAI;IAACsB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5BX,IAAA,CAACX,MAAM;MACLuB,OAAO,EAAErB,aAAa,CAACsB,SAAU;MACjCC,IAAI,EAAExB,UAAU,CAACyB,KAAM;MACvBR,IAAI,eAAEP,IAAA,CAACF,UAAU,IAAE,CAAE;MACrBkB,OAAO,EAAEZ;IAAa,CACvB,CAAC,eACFJ,IAAA,CAACd,IAAI;MAACsB,KAAK,EAAE,CAACC,MAAM,CAACQ,aAAa,EAAE;QAAEC,eAAe,EAAEb,UAAU,CAACc,MAAM,CAACC;MAAO,CAAC,CAAE;MAAAT,QAAA,eACjFX,IAAA,CAACM,YAAY;QAACe,KAAK,EAAE7B,MAAM,CAAC8B,SAAU;QAACR,IAAI,EAAE;MAAG,CAAE;IAAC,CAC/C,CAAC,eACPd,IAAA,CAACJ,UAAU;MAACgB,OAAO,EAAEnB,eAAe,CAAC8B,EAAG;MAACf,KAAK,EAAEC,MAAM,CAACe,KAAM;MAAAb,QAAA,EAC1DN,UAAU,CAACoB;IAAK,CACP,CAAC;EAAA,CACT,CAAC;AAEX,CAAC;AAED,MAAMhB,MAAM,GAAGtB,UAAU,CAACuC,MAAM,CAAC;EAC/BhB,SAAS,EAAE;IACTiB,MAAM,EAAE,EAAE;IACVC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE,EAAE;IACPC,eAAe,EAAEpC,OAAO,CAAC,GAAG,CAAC;IAC7BqC,iBAAiB,EAAErC,OAAO,CAAC,GAAG,CAAC;IAC/B,GAAGD,OAAO,CAAC,CAAC;EACd,CAAC;EACDuB,aAAa,EAAE;IACbgB,KAAK,EAAE,EAAE;IACTN,MAAM,EAAE,EAAE;IACVO,YAAY,EAAE9C,aAAa,CAAC,GAAG,CAAC;IAChCyC,UAAU,EAAE,QAAQ;IACpBM,cAAc,EAAE,QAAQ;IACxB,GAAGzC,OAAO,CAAC,CAAC;EACd,CAAC;EACD8B,KAAK,EAAE;IACLH,KAAK,EAAE7B,MAAM,CAAC4C,UAAU;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
|
+
import { COLORS, SPACING } from '@magmamath/react-native-ui';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const FluencySolvingProgress = ({
|
|
8
|
+
total,
|
|
9
|
+
activeIndex,
|
|
10
|
+
outcomes
|
|
11
|
+
}) => {
|
|
12
|
+
return /*#__PURE__*/_jsx(View, {
|
|
13
|
+
style: styles.container,
|
|
14
|
+
children: Array.from({
|
|
15
|
+
length: total
|
|
16
|
+
}).map((_, index) => {
|
|
17
|
+
if (index === activeIndex) return /*#__PURE__*/_jsx(View, {
|
|
18
|
+
style: styles.dotActive
|
|
19
|
+
}, index);
|
|
20
|
+
if (index < activeIndex) {
|
|
21
|
+
const outcome = outcomes[index];
|
|
22
|
+
return /*#__PURE__*/_jsx(View, {
|
|
23
|
+
style: outcome ? DOT_STYLE_BY_OUTCOME[outcome] : styles.dot
|
|
24
|
+
}, index);
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/_jsx(View, {
|
|
27
|
+
style: styles.dot
|
|
28
|
+
}, index);
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const styles = StyleSheet.create({
|
|
33
|
+
container: {
|
|
34
|
+
flexDirection: 'row',
|
|
35
|
+
gap: SPACING[200],
|
|
36
|
+
paddingHorizontal: SPACING[600],
|
|
37
|
+
paddingVertical: 14,
|
|
38
|
+
justifyContent: 'center'
|
|
39
|
+
},
|
|
40
|
+
dot: {
|
|
41
|
+
width: 12,
|
|
42
|
+
height: 12,
|
|
43
|
+
borderRadius: 6,
|
|
44
|
+
backgroundColor: COLORS.NEUTRAL_4
|
|
45
|
+
},
|
|
46
|
+
dotActive: {
|
|
47
|
+
width: 34,
|
|
48
|
+
height: 12,
|
|
49
|
+
backgroundColor: COLORS.NEUTRAL_10,
|
|
50
|
+
borderRadius: 9999
|
|
51
|
+
},
|
|
52
|
+
dotCorrect: {
|
|
53
|
+
width: 12,
|
|
54
|
+
height: 12,
|
|
55
|
+
borderRadius: 6,
|
|
56
|
+
backgroundColor: COLORS.PRIMARY_GREEN
|
|
57
|
+
},
|
|
58
|
+
dotWrong: {
|
|
59
|
+
width: 12,
|
|
60
|
+
height: 12,
|
|
61
|
+
borderRadius: 6,
|
|
62
|
+
backgroundColor: COLORS.PRIMARY_RED
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const DOT_STYLE_BY_OUTCOME = {
|
|
66
|
+
correct: styles.dotCorrect,
|
|
67
|
+
wrong: styles.dotWrong
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=FluencySolvingProgress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","COLORS","SPACING","jsx","_jsx","FluencySolvingProgress","total","activeIndex","outcomes","style","styles","container","children","Array","from","length","map","_","index","dotActive","outcome","DOT_STYLE_BY_OUTCOME","dot","create","flexDirection","gap","paddingHorizontal","paddingVertical","justifyContent","width","height","borderRadius","backgroundColor","NEUTRAL_4","NEUTRAL_10","dotCorrect","PRIMARY_GREEN","dotWrong","PRIMARY_RED","correct","wrong"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/fluency-solving/components/FluencySolvingProgress.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAS5D,OAAO,MAAMC,sBAAsB,GAAGA,CAAC;EACrCC,KAAK;EACLC,WAAW;EACXC;AAC2B,CAAC,KAAK;EACjC,oBACEJ,IAAA,CAACL,IAAI;IAACU,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,EAC3BC,KAAK,CAACC,IAAI,CAAC;MAAEC,MAAM,E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C;EACDC,QAAQ,EAAE;IACRR,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,CAAC;IACfC,eAAe,EAAE/B,MAAM,CAACqC;EAC1B;AACF,CAAC,CAAC;AAEF,MAAMjB,oBAAqD,GAAG;EAC5DkB,OAAO,EAAE7B,MAAM,CAACyB,UAAU;EAC1BK,KAAK,EAAE9B,MAAM,CAAC2B;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { FluencyMode } from "../../fluency.constants.js";
|
|
4
|
+
const HOUR_MS = 60 * 60 * 1000;
|
|
5
|
+
const BOX_1_INTERVAL = 4 * HOUR_MS;
|
|
6
|
+
const BOX_2_INTERVAL = 36 * HOUR_MS; // 1.5 days
|
|
7
|
+
const BOX_3_INTERVAL = 144 * HOUR_MS; // 6 days
|
|
8
|
+
const BOX_4_INTERVAL = 672 * HOUR_MS; // 4 weeks
|
|
9
|
+
const BOX_5_INTERVAL = 2016 * HOUR_MS; // 12 weeks
|
|
10
|
+
|
|
11
|
+
export const DEFAULT_PICKER_PARAMS = {
|
|
12
|
+
wDue: 0.05,
|
|
13
|
+
wWeak: 0.35,
|
|
14
|
+
wEase: 0.3,
|
|
15
|
+
wRand: 0.02,
|
|
16
|
+
numBoxes: 5,
|
|
17
|
+
boxIntervals: [0, BOX_1_INTERVAL, BOX_2_INTERVAL, BOX_3_INTERVAL, BOX_4_INTERVAL, BOX_5_INTERVAL]
|
|
18
|
+
};
|
|
19
|
+
export const MODE_ANSWER_EVAL_FORMULA = {
|
|
20
|
+
[FluencyMode.ADDITION]: (a, b) => a + b,
|
|
21
|
+
[FluencyMode.SUBTRACTION]: (a, b) => a - b,
|
|
22
|
+
[FluencyMode.MULTIPLICATION]: (a, b) => a * b,
|
|
23
|
+
[FluencyMode.DIVISION]: (a, b) => a / b
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=fluencySolving.constants.js.map
|
package/dist/module/features/fluency/components/fluency-solving/fluencySolving.constants.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FluencyMode","HOUR_MS","BOX_1_INTERVAL","BOX_2_INTERVAL","BOX_3_INTERVAL","BOX_4_INTERVAL","BOX_5_INTERVAL","DEFAULT_PICKER_PARAMS","wDue","wWeak","wEase","wRand","numBoxes","boxIntervals","MODE_ANSWER_EVAL_FORMULA","ADDITION","a","b","SUBTRACTION","MULTIPLICATION","DIVISION"],"sourceRoot":"../../../../../../src","sources":["features/fluency/components/fluency-solving/fluencySolving.constants.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,4BAAyB;AAGrD,MAAMC,OAAO,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;AAC9B,MAAMC,cAAc,GAAG,CAAC,GAAGD,OAAO;AAClC,MAAME,cAAc,GAAG,EAAE,GAAGF,OAAO,EAAC;AACpC,MAAMG,cAAc,GAAG,GAAG,GAAGH,OAAO,EAAC;AACrC,MAAMI,cAAc,GAAG,GAAG,GAAGJ,OAAO,EAAC;AACrC,MAAMK,cAAc,GAAG,IAAI,GAAGL,OAAO,EAAC;;AAEtC,OAAO,MAAMM,qBAAmC,GAAG;EACjDC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE,IAAI;EACXC,KAAK,EAAE,GAAG;EACVC,KAAK,EAAE,IAAI;EACXC,QAAQ,EAAE,CAAC;EACXC,YAAY,EAAE,CAAC,CAAC,EAAEX,cAAc,EAAEC,cAAc,EAAEC,cAAc,EAAEC,cAAc,EAAEC,cAAc;AAClG,CAAC;AAED,OAAO,MAAMQ,wBAA+E,GAAG;EAC7F,CAACd,WAAW,CAACe,QAAQ,GAAG,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC;EACvC,CAACjB,WAAW,CAACkB,WAAW,GAAG,CAACF,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC;EAC1C,CAACjB,WAAW,CAACmB,cAAc,GAAG,CAACH,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC;EAC7C,CAACjB,WAAW,CAACoB,QAAQ,GAAG,CAACJ,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC;AACxC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { DEFAULT_PICKER_PARAMS, MODE_ANSWER_EVAL_FORMULA } from "./fluencySolving.constants.js";
|
|
4
|
+
export function toSolvingFacts(factMap, mode) {
|
|
5
|
+
return Object.entries(factMap).map(([id, fact]) => {
|
|
6
|
+
const [a, b] = fact.numbers;
|
|
7
|
+
const answer = MODE_ANSWER_EVAL_FORMULA[mode](a, b);
|
|
8
|
+
const box = fact.box ?? 0;
|
|
9
|
+
return {
|
|
10
|
+
id,
|
|
11
|
+
numbers: fact.numbers,
|
|
12
|
+
answer,
|
|
13
|
+
difficulty: fact.difficulty,
|
|
14
|
+
box,
|
|
15
|
+
lastSeenMs: fact.lastAttemptedAt ? new Date(fact.lastAttemptedAt).getTime() : null,
|
|
16
|
+
sessionStartBox: box,
|
|
17
|
+
hasFailedThisSession: false
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function calculateAttentionScore(fact, now, params, maxDifficulty) {
|
|
22
|
+
const interval = params.boxIntervals[fact.box] || params.boxIntervals[1];
|
|
23
|
+
const overdueness = fact.lastSeenMs === null ? 1 : Math.max(0, (now - fact.lastSeenMs) / interval);
|
|
24
|
+
const weakness = 1 - fact.box / params.numBoxes;
|
|
25
|
+
const ease = maxDifficulty > 0 ? fact.difficulty / maxDifficulty : 0;
|
|
26
|
+
const rand = Math.random();
|
|
27
|
+
return params.wDue * overdueness + params.wWeak * weakness + params.wEase * (ease * weakness) + params.wRand * rand;
|
|
28
|
+
}
|
|
29
|
+
export function selectNextFact(facts, now, params = DEFAULT_PICKER_PARAMS) {
|
|
30
|
+
if (facts.length === 0) return null;
|
|
31
|
+
const available = facts.filter(f => f.box < params.numBoxes);
|
|
32
|
+
const pool = available.length > 0 ? available : facts;
|
|
33
|
+
const maxDifficulty = Math.max(...pool.map(f => f.difficulty));
|
|
34
|
+
const scored = pool.map(fact => ({
|
|
35
|
+
fact,
|
|
36
|
+
score: calculateAttentionScore(fact, now, params, maxDifficulty)
|
|
37
|
+
}));
|
|
38
|
+
return scored.reduce((best, curr) => curr.score > best.score ? curr : best).fact;
|
|
39
|
+
}
|
|
40
|
+
export function calculateNextBox({
|
|
41
|
+
currentBox,
|
|
42
|
+
isCorrect,
|
|
43
|
+
isFast,
|
|
44
|
+
sessionStartBox,
|
|
45
|
+
hasFailedThisSession
|
|
46
|
+
}) {
|
|
47
|
+
if (!isCorrect) return Math.max(1, currentBox - 1);
|
|
48
|
+
if (!isFast) return currentBox;
|
|
49
|
+
if (hasFailedThisSession || currentBox >= sessionStartBox + 1) return currentBox;
|
|
50
|
+
return Math.min(currentBox + 1, 5);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=fluencySolving.helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_PICKER_PARAMS","MODE_ANSWER_EVAL_FORMULA","toSolvingFacts","factMap","mode","Object","entries","map","id","fact","a","b","numbers","answer","box","difficulty","lastSeenMs","lastAttemptedAt","Date","getTime","sessionStartBox","hasFailedThisSession","calculateAttentionScore","now","params","maxDifficulty","interval","boxIntervals","overdueness","Math","max","weakness","numBoxes","ease","rand","random","wDue","wWeak","wEase","wRand","selectNextFact","facts","length","available","filter","f","pool","scored","score","reduce","best","curr","calculateNextBox","currentBox","isCorrect","isFast","min"],"sourceRoot":"../../../../../../src","sources":["features/fluency/components/fluency-solving/fluencySolving.helpers.ts"],"mappings":";;AAEA,SAASA,qBAAqB,EAAEC,wBAAwB,QAAQ,+BAA4B;AAG5F,OAAO,SAASC,cAAcA,CAACC,OAA6B,EAAEC,IAAi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B,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEuB,UAAU,GAAG,CAAC,CAAC;EAClD,IAAI,CAACE,MAAM,EAAE,OAAOF,UAAU;EAC9B,IAAIhC,oBAAoB,IAAIgC,UAAU,IAAIjC,eAAe,GAAG,CAAC,EAAE,OAAOiC,UAAU;EAChF,OAAOxB,IAAI,CAAC2B,GAAG,CAACH,UAAU,GAAG,CAAC,EAAE,CAAC,CAAC;AACpC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["features/fluency/components/fluency-solving/fluencySolving.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
export const FluencyMatrix = () => /*#__PURE__*/_jsxs(View, {
|
|
10
10
|
style: styles.container,
|
|
11
11
|
children: [/*#__PURE__*/_jsx(View, {
|
|
12
|
-
style: styles.
|
|
12
|
+
style: styles.matrixFillContainer,
|
|
13
13
|
children: /*#__PURE__*/_jsx(MatrixFill, {})
|
|
14
14
|
}), /*#__PURE__*/_jsx(MatrixLegend, {})]
|
|
15
15
|
});
|
|
@@ -21,7 +21,7 @@ const styles = StyleSheet.create({
|
|
|
21
21
|
overflow: 'hidden',
|
|
22
22
|
...SHADOWS[1]
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
matrixFillContainer: {
|
|
25
25
|
flex: 1,
|
|
26
26
|
padding: SPACING[300],
|
|
27
27
|
minHeight: 354
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","BORDER_RADIUS","COLORS","SHADOWS","SPACING","MatrixLegend","MatrixFill","jsx","_jsx","jsxs","_jsxs","FluencyMatrix","style","styles","container","children","
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","BORDER_RADIUS","COLORS","SHADOWS","SPACING","MatrixLegend","MatrixFill","jsx","_jsx","jsxs","_jsxs","FluencyMatrix","style","styles","container","children","matrixFillContainer","create","flex","backgroundColor","NEUTRAL_1","borderRadius","overflow","padding","minHeight"],"sourceRoot":"../../../../../../src","sources":["features/fluency/components/matrix/FluencyMatrix.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,aAAa,EAAEC,MAAM,EAAEC,OAAO,EAAEC,OAAO,QAAQ,4BAA4B;AACpF,SAASC,YAAY,QAAQ,8BAA2B;AACxD,SAASC,UAAU,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpD,OAAO,MAAMC,aAAa,GAAGA,CAAA,kBAC3BD,KAAA,CAACX,IAAI;EAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAAC,QAAA,gBAC5BP,IAAA,CAACT,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACG,mBAAoB;IAAAD,QAAA,eACtCP,IAAA,CAACF,UAAU,IAAE;EAAC,CACV,CAAC,eAEPE,IAAA,CAACH,YAAY,IAAE,CAAC;AAAA,CACZ,CACP;AAED,MAAMQ,MAAM,GAAGb,UAAU,CAACiB,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE,CAAC;IACPC,eAAe,EAAEjB,MAAM,CAACkB,SAAS;IACjCC,YAAY,EAAEpB,aAAa,CAAC,GAAG,CAAC;IAChCqB,QAAQ,EAAE,QAAQ;IAClB,GAAGnB,OAAO,CAAC,CAAC;EACd,CAAC;EACDa,mBAAmB,EAAE;IACnBE,IAAI,EAAE,CAAC;IACPK,OAAO,EAAEnB,OAAO,CAAC,GAAG,CAAC;IACrBoB,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,26 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View, Text, StyleSheet } from 'react-native';
|
|
5
|
-
import { BORDER_RADIUS, COLORS } from '@magmamath/react-native-ui';
|
|
6
|
-
import {
|
|
5
|
+
import { BORDER_RADIUS, COLORS, SPACING } from '@magmamath/react-native-ui';
|
|
6
|
+
import { getMasteryLevelByBox } from "../../../fluency.helpers.js";
|
|
7
7
|
import { FluencyMasteryLevel } from "../../../fluency.constants.js";
|
|
8
8
|
import { StarFillIcon } from "../../../assets/StarFillIcon.js";
|
|
9
|
-
import {
|
|
9
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
export const MatrixCell = ({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
label,
|
|
12
|
+
box,
|
|
13
|
+
isHeader,
|
|
14
|
+
levelColors,
|
|
15
|
+
divisor
|
|
15
16
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
const isMastered =
|
|
18
|
-
const
|
|
17
|
+
const masteryLevel = box ? getMasteryLevelByBox(box) : null;
|
|
18
|
+
const isMastered = masteryLevel === FluencyMasteryLevel.MASTERED;
|
|
19
|
+
const bgColor = (() => {
|
|
20
|
+
if (masteryLevel) return levelColors[masteryLevel];
|
|
21
|
+
if (isHeader) return COLORS.NEUTRAL_5;
|
|
22
|
+
return COLORS.NEUTRAL_2;
|
|
23
|
+
})();
|
|
19
24
|
return /*#__PURE__*/_jsxs(View, {
|
|
20
25
|
style: [styles.cell, {
|
|
21
|
-
backgroundColor:
|
|
26
|
+
backgroundColor: bgColor
|
|
22
27
|
}],
|
|
23
|
-
children: [
|
|
24
|
-
style: styles.
|
|
28
|
+
children: [divisor !== null ? /*#__PURE__*/_jsx(View, {
|
|
29
|
+
style: styles.starContainer,
|
|
30
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
31
|
+
style: styles.divisorText,
|
|
32
|
+
children: ["\xF7", divisor]
|
|
33
|
+
})
|
|
34
|
+
}) : isMastered && /*#__PURE__*/_jsx(StarFillIcon, {}), label !== null && /*#__PURE__*/_jsx(Text, {
|
|
35
|
+
style: divisor ? styles.cellNumber : styles.headerText,
|
|
25
36
|
children: label
|
|
26
37
|
})]
|
|
27
38
|
});
|
|
@@ -33,9 +44,27 @@ const styles = StyleSheet.create({
|
|
|
33
44
|
alignItems: 'center',
|
|
34
45
|
justifyContent: 'center'
|
|
35
46
|
},
|
|
47
|
+
starContainer: {
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
top: 3,
|
|
50
|
+
right: SPACING[100]
|
|
51
|
+
},
|
|
52
|
+
divisorText: {
|
|
53
|
+
fontSize: 10,
|
|
54
|
+
fontWeight: '500',
|
|
55
|
+
color: COLORS.NEUTRAL_1,
|
|
56
|
+
lineHeight: SPACING[300]
|
|
57
|
+
},
|
|
58
|
+
cellNumber: {
|
|
59
|
+
fontSize: 14,
|
|
60
|
+
fontWeight: '700',
|
|
61
|
+
color: COLORS.NEUTRAL_3,
|
|
62
|
+
lineHeight: SPACING[400]
|
|
63
|
+
},
|
|
36
64
|
headerText: {
|
|
37
|
-
fontSize:
|
|
38
|
-
|
|
65
|
+
fontSize: 12,
|
|
66
|
+
fontWeight: '600',
|
|
67
|
+
color: COLORS.NEUTRAL_8
|
|
39
68
|
}
|
|
40
69
|
});
|
|
41
70
|
//# sourceMappingURL=MatrixCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","BORDER_RADIUS","COLORS","
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","BORDER_RADIUS","COLORS","SPACING","getMasteryLevelByBox","FluencyMasteryLevel","StarFillIcon","jsxs","_jsxs","jsx","_jsx","MatrixCell","label","box","isHeader","levelColors","divisor","masteryLevel","isMastered","MASTERED","bgColor","NEUTRAL_5","NEUTRAL_2","style","styles","cell","backgroundColor","children","starContainer","divisorText","cellNumber","headerText","create","flex","borderRadius","alignItems","justifyContent","position","top","right","fontSize","fontWeight","color","NEUTRAL_1","lineHeight","NEUTRAL_3","NEUTRAL_8"],"sourceRoot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BAAIR,IAAA,CAACJ,YAAY,IAAE,CAC9B,EAEAM,KAAK,KAAK,IAAI,iBACbF,IAAA,CAACX,IAAI;MAACwB,KAAK,EAAEP,OAAO,GAAGQ,MAAM,CAACM,UAAU,GAAGN,MAAM,CAACO,UAAW;MAAAJ,QAAA,EAAEf;IAAK,CAAO,CAC5E;EAAA,CACG,CAAC;AAEX,CAAC;AAED,MAAMY,MAAM,GAAGxB,UAAU,CAACgC,MAAM,CAAC;EAC/BP,IAAI,EAAE;IACJQ,IAAI,EAAE,CAAC;IACPC,YAAY,EAAEjC,aAAa,CAAC,GAAG,CAAC;IAChCkC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDR,aAAa,EAAE;IACbS,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAEpC,OAAO,CAAC,GAAG;EACpB,CAAC;EACD0B,WAAW,EAAE;IACXW,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,KAAK,EAAExC,MAAM,CAACyC,SAAS;IACvBC,UAAU,EAAEzC,OAAO,CAAC,GAAG;EACzB,CAAC;EACD2B,UAAU,EAAE;IACVU,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,KAAK,EAAExC,MAAM,CAAC2C,SAAS;IACvBD,UAAU,EAAEzC,OAAO,CAAC,GAAG;EACzB,CAAC;EACD4B,UAAU,EAAE;IACVS,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,KAAK,EAAExC,MAAM,CAAC4C;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,49 +3,39 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View, StyleSheet } from 'react-native';
|
|
5
5
|
import { SPACING } from '@magmamath/react-native-ui';
|
|
6
|
+
import { useUnit } from 'effector-react';
|
|
6
7
|
import { MatrixCell } from "./MatrixCell.js";
|
|
7
|
-
import {
|
|
8
|
+
import { useFluency } from "../../../context/FluencyContext.js";
|
|
8
9
|
import { useFluencyModePreset } from "../../../hooks/useFluencyModePreset.js";
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
const MOCK_SCORES = {
|
|
11
|
-
'1-1': 90,
|
|
12
|
-
'2-3': 70,
|
|
13
|
-
'3-5': 50,
|
|
14
|
-
'5-2': 30,
|
|
15
|
-
'4-4': 10,
|
|
16
|
-
'1-5': 85,
|
|
17
|
-
'3-3': 45
|
|
18
|
-
};
|
|
19
11
|
export const MatrixFill = () => {
|
|
20
12
|
const {
|
|
21
|
-
|
|
22
|
-
} =
|
|
13
|
+
model
|
|
14
|
+
} = useFluency();
|
|
15
|
+
const modePreset = useFluencyModePreset();
|
|
16
|
+
const grid = useUnit(model.matrix.$matrix);
|
|
17
|
+
if (!grid) return null;
|
|
23
18
|
return /*#__PURE__*/_jsx(View, {
|
|
24
19
|
style: styles.grid,
|
|
25
|
-
children:
|
|
26
|
-
length: MATRIX_SIZE
|
|
27
|
-
}, (_, row) => /*#__PURE__*/_jsx(View, {
|
|
20
|
+
children: grid.map((row, rowIdx) => /*#__PURE__*/_jsx(View, {
|
|
28
21
|
style: styles.row,
|
|
29
|
-
children:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
score: MOCK_SCORES[`${row}-${col}`] ?? null,
|
|
35
|
-
mastery: matrix.mastery
|
|
36
|
-
}, col))
|
|
37
|
-
}, row))
|
|
22
|
+
children: row.map((cell, colIdx) => /*#__PURE__*/_jsx(MatrixCell, {
|
|
23
|
+
...cell,
|
|
24
|
+
levelColors: modePreset.colors.level
|
|
25
|
+
}, colIdx))
|
|
26
|
+
}, rowIdx))
|
|
38
27
|
});
|
|
39
28
|
};
|
|
40
29
|
const styles = StyleSheet.create({
|
|
41
30
|
grid: {
|
|
42
31
|
flex: 1,
|
|
43
|
-
gap: SPACING[
|
|
32
|
+
gap: SPACING[100]
|
|
44
33
|
},
|
|
45
34
|
row: {
|
|
46
35
|
flex: 1,
|
|
36
|
+
minHeight: SPACING[800],
|
|
47
37
|
flexDirection: 'row',
|
|
48
|
-
gap: SPACING[
|
|
38
|
+
gap: SPACING[100]
|
|
49
39
|
}
|
|
50
40
|
});
|
|
51
41
|
//# sourceMappingURL=MatrixFill.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","SPACING","MatrixCell","
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","SPACING","useUnit","MatrixCell","useFluency","useFluencyModePreset","jsx","_jsx","MatrixFill","model","modePreset","grid","matrix","$matrix","style","styles","children","map","row","rowIdx","cell","colIdx","levelColors","colors","level","create","flex","gap","minHeight","flexDirection"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/matrix/components/MatrixFill.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,4BAA4B;AACpD,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,UAAU,QAAQ,oCAAiC;AAC5D,SAASC,oBAAoB,QAAQ,wCAAqC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE1E,OAAO,MAAMC,UAAU,GAAGA,CAAA,KAAM;EAC9B,MAAM;IAAEC;EAAM,CAAC,GAAGL,UAAU,CAAC,CAAC;EAC9B,MAAMM,UAAU,GAAGL,oBAAoB,CAAC,CAAC;EACzC,MAAMM,IAAI,GAAGT,OAAO,CAACO,KAAK,CAACG,MAAM,CAACC,OAAO,CAAC;EAE1C,IAAI,CAACF,IAAI,EAAE,OAAO,IAAI;EAEtB,oBACEJ,IAAA,CAACR,IAAI;IAACe,KAAK,EAAEC,MAAM,CAACJ,IAAK;IAAAK,QAAA,EACtBL,IAAI,CAACM,GAAG,CAAC,CAACC,GAAG,EAAEC,MAAM,kBACpBZ,IAAA,CAACR,IAAI;MAAce,KAAK,EAAEC,MAAM,CAACG,GAAI;MAAAF,QAAA,EAClCE,GAAG,CAACD,GAAG,CAAC,CAACG,IAAI,EAAEC,MAAM,kBACpBd,IAAA,CAACJ,UAAU;QAAA,GAAkBiB,IAAI;QAAEE,WAAW,EAAEZ,UAAU,CAACa,MAAM,CAACC;MAAM,GAAvDH,MAAyD,CAC3E;IAAC,GAHOF,MAIL,CACP;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMJ,MAAM,GAAGf,UAAU,CAACyB,MAAM,CAAC;EAC/Bd,IAAI,EAAE;IACJe,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE1B,OAAO,CAAC,GAAG;EAClB,CAAC;EACDiB,GAAG,EAAE;IACHQ,IAAI,EAAE,CAAC;IACPE,SAAS,EAAE3B,OAAO,CAAC,GAAG,CAAC;IACvB4B,aAAa,EAAE,KAAK;IACpBF,GAAG,EAAE1B,OAAO,CAAC,GAAG;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,11 +9,7 @@ import { useText } from "../../../../../i18n/i18n.js";
|
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
export const MatrixLegend = () => {
|
|
11
11
|
const t = useText();
|
|
12
|
-
const
|
|
13
|
-
matrix,
|
|
14
|
-
buttonColor,
|
|
15
|
-
legendItems
|
|
16
|
-
} = useFluencyModePreset();
|
|
12
|
+
const modePreset = useFluencyModePreset();
|
|
17
13
|
const {
|
|
18
14
|
onPracticePress
|
|
19
15
|
} = useFluency();
|
|
@@ -21,7 +17,7 @@ export const MatrixLegend = () => {
|
|
|
21
17
|
style: styles.container,
|
|
22
18
|
children: [/*#__PURE__*/_jsx(View, {
|
|
23
19
|
style: styles.legendItems,
|
|
24
|
-
children:
|
|
20
|
+
children: modePreset.legend.items.map(item => /*#__PURE__*/_jsxs(View, {
|
|
25
21
|
style: styles.legendItem,
|
|
26
22
|
children: [/*#__PURE__*/_jsx(View, {
|
|
27
23
|
style: [styles.legendDot, {
|
|
@@ -36,7 +32,7 @@ export const MatrixLegend = () => {
|
|
|
36
32
|
onPress: onPracticePress,
|
|
37
33
|
variant: ButtonVariant.PRIMARY,
|
|
38
34
|
size: ButtonSize.MEDIUM,
|
|
39
|
-
colorScheme:
|
|
35
|
+
colorScheme: modePreset.colors.button,
|
|
40
36
|
icon: /*#__PURE__*/_jsx(PlayIcon, {
|
|
41
37
|
color: COLORS.NEUTRAL_1
|
|
42
38
|
}),
|
|
@@ -45,7 +41,7 @@ export const MatrixLegend = () => {
|
|
|
45
41
|
container: styles.practiceButton,
|
|
46
42
|
text: styles.practiceButtonText
|
|
47
43
|
},
|
|
48
|
-
children: `${t('student.fluency.practice')} ${
|
|
44
|
+
children: `${t('student.fluency.practice')} ${modePreset.label}`
|
|
49
45
|
})]
|
|
50
46
|
});
|
|
51
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","BORDER_RADIUS","Button","ButtonSize","ButtonVariant","COLORS","PlayIcon","SHADOWS","SPACING","useFluencyModePreset","useFluency","useText","jsx","_jsx","jsxs","_jsxs","MatrixLegend","t","
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","BORDER_RADIUS","Button","ButtonSize","ButtonVariant","COLORS","PlayIcon","SHADOWS","SPACING","useFluencyModePreset","useFluency","useText","jsx","_jsx","jsxs","_jsxs","MatrixLegend","t","modePreset","onPracticePress","style","styles","container","children","legendItems","legend","items","map","item","legendItem","legendDot","backgroundColor","color","withBorder","legendDotBorder","legendLabel","label","onPress","variant","PRIMARY","size","MEDIUM","colorScheme","colors","button","icon","NEUTRAL_1","raiseLevel","practiceButton","text","practiceButtonText","create","height","flexDirection","alignItems","justifyContent","NEUTRAL_2","borderBottomColor","NEUTRAL_5","paddingHorizontal","paddingVertical","borderTopLeftRadius","borderTopRightRadius","gap","width","borderRadius","borderWidth","borderColor","fontSize","NEUTRAL_7","alignSelf","textTransform"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/matrix/components/MatrixLegend.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SACEC,aAAa,EACbC,MAAM,EACNC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,OAAO,QACF,4BAA4B;AACnC,SAASC,oBAAoB,QAAQ,wCAAqC;AAC1E,SAASC,UAAU,QAAQ,oCAAiC;AAC5D,SAASC,OAAO,QAAQ,6BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElD,OAAO,MAAMC,YAAY,GAAGA,CAAA,KAAM;EAChC,MAAMC,CAAC,GAAGN,OAAO,CAAC,CAAC;EACnB,MAAMO,UAAU,GAAGT,oBAAoB,CAAC,CAAC;EACzC,MAAM;IAAEU;EAAgB,CAAC,GAAGT,UAAU,CAAC,CAAC;EAExC,oBACEK,KAAA,CAACjB,IAAI;IAACsB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5BV,IAAA,CAACf,IAAI;MAACsB,KAAK,EAAEC,MAAM,CAACG,WAAY;MAAAD,QAAA,EAC7BL,UAAU,CAACO,MAAM,CAACC,KAAK,CAACC,GAAG,CAAEC,IAAI,iBAChCb,KAAA,CAACjB,IAAI;QAAkBsB,KAAK,EAAEC,MAAM,CAACQ,UAAW;QAAAN,QAAA,gBAC9CV,IAAA,CAACf,IAAI;UACHsB,KAAK,EAAE,CACLC,MAAM,CAACS,SAAS,EAChB;YAAEC,eAAe,EAAEH,IAAI,CAACI;UAAM,CAAC,EAC/BJ,IAAI,CAACK,UAAU,IAAIZ,MAAM,CAACa,eAAe;QACzC,CACH,CAAC,eACFrB,IAAA,CAACd,IAAI;UAACqB,KAAK,EAAEC,MAAM,CAACc,WAAY;UAAAZ,QAAA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AAO,CAAC,GAAG;EAClB,CAAC;EACDqB,UAAU,EAAE;IACVwB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBS,GAAG,EAAEvD,OAAO,CAAC,GAAG;EAClB,CAAC;EACDsB,SAAS,EAAE;IACTkC,KAAK,EAAE,EAAE;IACTZ,MAAM,EAAE,EAAE;IACVa,YAAY,EAAE;EAChB,CAAC;EACD/B,eAAe,EAAE;IACfgC,WAAW,EAAE,GAAG;IAChBC,WAAW,EAAE9D,MAAM,CAACqD;EACtB,CAAC;EACDvB,WAAW,EAAE;IACXiC,QAAQ,EAAE,EAAE;IACZpC,KAAK,EAAE3B,MAAM,CAACgE;EAChB,CAAC;EACDrB,cAAc,EAAE;IACdsB,SAAS,EAAE;EACb,CAAC;EACDpB,kBAAkB,EAAE;IAClBqB,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, StyleSheet, useWindowDimensions } from 'react-native';
|
|
5
|
+
import { Button, ButtonVariant, SPACING } from '@magmamath/react-native-ui';
|
|
6
|
+
import { MenuIcon } from "../../../../shared/icons/MenuIcon.js";
|
|
7
|
+
import { isWeb } from "../../../../shared/common.constants.js";
|
|
8
|
+
import { BURGER_MENU_BREAKPOINT } from '@magmamath/students-features';
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
export const MobileMenu = ({
|
|
11
|
+
onPress
|
|
12
|
+
}) => {
|
|
13
|
+
const dimensions = useWindowDimensions();
|
|
14
|
+
const isVisible = isWeb && dimensions.width <= BURGER_MENU_BREAKPOINT;
|
|
15
|
+
if (!isVisible) return null;
|
|
16
|
+
return /*#__PURE__*/_jsx(View, {
|
|
17
|
+
style: styles.container,
|
|
18
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
19
|
+
onPress: onPress,
|
|
20
|
+
variant: ButtonVariant.TERTIARY,
|
|
21
|
+
icon: /*#__PURE__*/_jsx(MenuIcon, {
|
|
22
|
+
size: 24
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const styles = StyleSheet.create({
|
|
28
|
+
container: {
|
|
29
|
+
marginRight: SPACING[200]
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=MobileMenu.js.map
|