@magmamath/students-features 1.3.25 → 1.3.26-rc.1
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/assets/DivideIcon.js +32 -0
- package/dist/commonjs/features/fluency/assets/DivideIcon.js.map +1 -0
- package/dist/commonjs/features/fluency/assets/SpringIcon.js +29 -0
- package/dist/commonjs/features/fluency/assets/SpringIcon.js.map +1 -0
- package/dist/commonjs/features/fluency/assets/StarFillIcon.js +29 -0
- package/dist/commonjs/features/fluency/assets/StarFillIcon.js.map +1 -0
- package/dist/commonjs/features/fluency/components/Fluency.js +98 -0
- package/dist/commonjs/features/fluency/components/Fluency.js.map +1 -0
- package/dist/commonjs/features/fluency/components/FluencySolving.js +42 -0
- package/dist/commonjs/features/fluency/components/FluencySolving.js.map +1 -0
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js +91 -0
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -0
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js +73 -0
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.js +123 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.js +183 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.js +64 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.js +71 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.js +47 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.js.map +1 -0
- package/dist/commonjs/features/fluency/components/matrix/FluencyMatrix.js +36 -0
- package/dist/commonjs/features/fluency/components/matrix/FluencyMatrix.js.map +1 -0
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixCell.js +47 -0
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixCell.js.map +1 -0
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js +57 -0
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js.map +1 -0
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js +105 -0
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -0
- package/dist/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.js +43 -0
- package/dist/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.js.map +1 -0
- package/dist/commonjs/features/fluency/components/select-math-operator/ProgressBar.js +124 -0
- package/dist/commonjs/features/fluency/components/select-math-operator/ProgressBar.js.map +1 -0
- package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js +63 -0
- package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -0
- package/dist/commonjs/features/fluency/components/start-banner/BannerFlashcards.js +80 -0
- package/dist/commonjs/features/fluency/components/start-banner/BannerFlashcards.js.map +1 -0
- package/dist/commonjs/features/fluency/components/start-banner/MathFlashcard.js +73 -0
- package/dist/commonjs/features/fluency/components/start-banner/MathFlashcard.js.map +1 -0
- package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js +111 -0
- package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js.map +1 -0
- package/dist/commonjs/features/fluency/context/FluencyContext.js +16 -0
- package/dist/commonjs/features/fluency/context/FluencyContext.js.map +1 -0
- package/dist/commonjs/features/fluency/fluency.constants.js +80 -0
- package/dist/commonjs/features/fluency/fluency.constants.js.map +1 -0
- package/dist/commonjs/features/fluency/fluency.helpers.js +67 -0
- package/dist/commonjs/features/fluency/fluency.helpers.js.map +1 -0
- package/dist/commonjs/features/fluency/fluency.types.js +6 -0
- package/dist/commonjs/features/fluency/fluency.types.js.map +1 -0
- package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js +39 -0
- package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js.map +1 -0
- package/dist/commonjs/features/fluency/index.js +68 -0
- package/dist/commonjs/features/fluency/index.js.map +1 -0
- package/dist/commonjs/features/fluency/model/FluencyApiModel.js +11 -0
- package/dist/commonjs/features/fluency/model/FluencyApiModel.js.map +1 -0
- package/dist/commonjs/features/fluency/model/FluencyDaysStreakModel.js +9 -0
- package/dist/commonjs/features/fluency/model/FluencyDaysStreakModel.js.map +1 -0
- package/dist/commonjs/features/fluency/model/FluencyInputModel.js +23 -0
- package/dist/commonjs/features/fluency/model/FluencyInputModel.js.map +1 -0
- package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js +9 -0
- package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js.map +1 -0
- package/dist/commonjs/features/fluency/model/FluencyModel.js +28 -0
- package/dist/commonjs/features/fluency/model/FluencyModel.js.map +1 -0
- package/dist/commonjs/features/fluency/model/FluencySolvingModel.js +9 -0
- package/dist/commonjs/features/fluency/model/FluencySolvingModel.js.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/module/features/fluency/assets/DivideIcon.js +24 -0
- package/dist/module/features/fluency/assets/DivideIcon.js.map +1 -0
- package/dist/module/features/fluency/assets/SpringIcon.js +22 -0
- package/dist/module/features/fluency/assets/SpringIcon.js.map +1 -0
- package/dist/module/features/fluency/assets/StarFillIcon.js +21 -0
- package/dist/module/features/fluency/assets/StarFillIcon.js.map +1 -0
- package/dist/module/features/fluency/components/Fluency.js +92 -0
- package/dist/module/features/fluency/components/Fluency.js.map +1 -0
- package/dist/module/features/fluency/components/FluencySolving.js +36 -0
- package/dist/module/features/fluency/components/FluencySolving.js.map +1 -0
- package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js +85 -0
- package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -0
- package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js +67 -0
- package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencyEquationCard.js +117 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencyEquationCard.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencyNumpad.js +177 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencyNumpad.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingCard.js +57 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingCard.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingHeader.js +65 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingHeader.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingProgress.js +41 -0
- package/dist/module/features/fluency/components/fluency-solving/FluencySolvingProgress.js.map +1 -0
- package/dist/module/features/fluency/components/matrix/FluencyMatrix.js +30 -0
- package/dist/module/features/fluency/components/matrix/FluencyMatrix.js.map +1 -0
- package/dist/module/features/fluency/components/matrix/components/MatrixCell.js +41 -0
- package/dist/module/features/fluency/components/matrix/components/MatrixCell.js.map +1 -0
- package/dist/module/features/fluency/components/matrix/components/MatrixFill.js +51 -0
- package/dist/module/features/fluency/components/matrix/components/MatrixFill.js.map +1 -0
- package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js +99 -0
- package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -0
- package/dist/module/features/fluency/components/select-math-operator/MathOperatorRow.js +37 -0
- package/dist/module/features/fluency/components/select-math-operator/MathOperatorRow.js.map +1 -0
- package/dist/module/features/fluency/components/select-math-operator/ProgressBar.js +118 -0
- package/dist/module/features/fluency/components/select-math-operator/ProgressBar.js.map +1 -0
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js +57 -0
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -0
- package/dist/module/features/fluency/components/start-banner/BannerFlashcards.js +74 -0
- package/dist/module/features/fluency/components/start-banner/BannerFlashcards.js.map +1 -0
- package/dist/module/features/fluency/components/start-banner/MathFlashcard.js +67 -0
- package/dist/module/features/fluency/components/start-banner/MathFlashcard.js.map +1 -0
- package/dist/module/features/fluency/components/start-banner/StartBanner.js +105 -0
- package/dist/module/features/fluency/components/start-banner/StartBanner.js.map +1 -0
- package/dist/module/features/fluency/context/FluencyContext.js +11 -0
- package/dist/module/features/fluency/context/FluencyContext.js.map +1 -0
- package/dist/module/features/fluency/fluency.constants.js +77 -0
- package/dist/module/features/fluency/fluency.constants.js.map +1 -0
- package/dist/module/features/fluency/fluency.helpers.js +58 -0
- package/dist/module/features/fluency/fluency.helpers.js.map +1 -0
- package/dist/module/features/fluency/fluency.types.js +4 -0
- package/dist/module/features/fluency/fluency.types.js.map +1 -0
- package/dist/module/features/fluency/hooks/useFluencyModePreset.js +34 -0
- package/dist/module/features/fluency/hooks/useFluencyModePreset.js.map +1 -0
- package/dist/module/features/fluency/index.js +9 -0
- package/dist/module/features/fluency/index.js.map +1 -0
- package/dist/module/features/fluency/model/FluencyApiModel.js +6 -0
- package/dist/module/features/fluency/model/FluencyApiModel.js.map +1 -0
- package/dist/module/features/fluency/model/FluencyDaysStreakModel.js +4 -0
- package/dist/module/features/fluency/model/FluencyDaysStreakModel.js.map +1 -0
- package/dist/module/features/fluency/model/FluencyInputModel.js +18 -0
- package/dist/module/features/fluency/model/FluencyInputModel.js.map +1 -0
- package/dist/module/features/fluency/model/FluencyMatrixModel.js +4 -0
- package/dist/module/features/fluency/model/FluencyMatrixModel.js.map +1 -0
- package/dist/module/features/fluency/model/FluencyModel.js +23 -0
- package/dist/module/features/fluency/model/FluencyModel.js.map +1 -0
- package/dist/module/features/fluency/model/FluencySolvingModel.js +4 -0
- package/dist/module/features/fluency/model/FluencySolvingModel.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/typescript/commonjs/features/fluency/__tests__/FluencyModel.test.d.ts +2 -0
- package/dist/typescript/commonjs/features/fluency/__tests__/FluencyModel.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/assets/DivideIcon.d.ts +8 -0
- package/dist/typescript/commonjs/features/fluency/assets/DivideIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/assets/SpringIcon.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/assets/SpringIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/assets/StarFillIcon.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/assets/StarFillIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts +13 -0
- package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/FluencySolving.d.ts +9 -0
- package/dist/typescript/commonjs/features/fluency/components/FluencySolving.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts +11 -0
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts +12 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts +7 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts +8 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/FluencyMatrix.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/FluencyMatrix.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts +11 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixFill.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixLegend.d.ts +5 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixLegend.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.d.ts +13 -0
- package/dist/typescript/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/select-math-operator/ProgressBar.d.ts +8 -0
- package/dist/typescript/commonjs/features/fluency/components/select-math-operator/ProgressBar.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/start-banner/BannerFlashcards.d.ts +11 -0
- package/dist/typescript/commonjs/features/fluency/components/start-banner/BannerFlashcards.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/start-banner/MathFlashcard.d.ts +28 -0
- package/dist/typescript/commonjs/features/fluency/components/start-banner/MathFlashcard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/start-banner/StartBanner.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/context/FluencyContext.d.ts +11 -0
- package/dist/typescript/commonjs/features/fluency/context/FluencyContext.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts +25 -0
- package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts +19 -0
- package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts +46 -0
- package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts +7 -0
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/index.d.ts +7 -0
- package/dist/typescript/commonjs/features/fluency/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts +6 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyInputModel.d.ts +12 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyInputModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts +21 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/__tests__/FluencyModel.test.d.ts +2 -0
- package/dist/typescript/module/features/fluency/__tests__/FluencyModel.test.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/assets/DivideIcon.d.ts +8 -0
- package/dist/typescript/module/features/fluency/assets/DivideIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/assets/SpringIcon.d.ts +3 -0
- package/dist/typescript/module/features/fluency/assets/SpringIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/assets/StarFillIcon.d.ts +3 -0
- package/dist/typescript/module/features/fluency/assets/StarFillIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/Fluency.d.ts +13 -0
- package/dist/typescript/module/features/fluency/components/Fluency.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/FluencySolving.d.ts +9 -0
- package/dist/typescript/module/features/fluency/components/FluencySolving.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts +11 -0
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts +3 -0
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts +12 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyNumpad.d.ts +3 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyNumpad.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts +3 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts +7 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts +8 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/matrix/FluencyMatrix.d.ts +3 -0
- package/dist/typescript/module/features/fluency/components/matrix/FluencyMatrix.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts +11 -0
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixFill.d.ts +3 -0
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixLegend.d.ts +5 -0
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixLegend.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/select-math-operator/MathOperatorRow.d.ts +13 -0
- package/dist/typescript/module/features/fluency/components/select-math-operator/MathOperatorRow.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/select-math-operator/ProgressBar.d.ts +8 -0
- package/dist/typescript/module/features/fluency/components/select-math-operator/ProgressBar.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/select-math-operator/SelectMathOperator.d.ts +3 -0
- package/dist/typescript/module/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/start-banner/BannerFlashcards.d.ts +11 -0
- package/dist/typescript/module/features/fluency/components/start-banner/BannerFlashcards.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/start-banner/MathFlashcard.d.ts +28 -0
- package/dist/typescript/module/features/fluency/components/start-banner/MathFlashcard.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/start-banner/StartBanner.d.ts +3 -0
- package/dist/typescript/module/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/context/FluencyContext.d.ts +11 -0
- package/dist/typescript/module/features/fluency/context/FluencyContext.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/fluency.constants.d.ts +25 -0
- package/dist/typescript/module/features/fluency/fluency.constants.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/fluency.helpers.d.ts +19 -0
- package/dist/typescript/module/features/fluency/fluency.helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/fluency.types.d.ts +46 -0
- package/dist/typescript/module/features/fluency/fluency.types.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts +7 -0
- package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/index.d.ts +7 -0
- package/dist/typescript/module/features/fluency/index.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts +6 -0
- package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts +3 -0
- package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/model/FluencyInputModel.d.ts +12 -0
- package/dist/typescript/module/features/fluency/model/FluencyInputModel.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts +3 -0
- package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts +21 -0
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts +3 -0
- package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/fluency/__tests__/FluencyModel.test.ts +28 -0
- package/src/features/fluency/assets/DivideIcon.tsx +21 -0
- package/src/features/fluency/assets/SpringIcon.tsx +17 -0
- package/src/features/fluency/assets/StarFillIcon.tsx +16 -0
- package/src/features/fluency/components/Fluency.tsx +101 -0
- package/src/features/fluency/components/FluencySolving.tsx +32 -0
- package/src/features/fluency/components/day-streak-counter/DayStreak.tsx +82 -0
- package/src/features/fluency/components/day-streak-counter/DayStreakCounter.tsx +68 -0
- package/src/features/fluency/components/fluency-solving/FluencyEquationCard.tsx +115 -0
- package/src/features/fluency/components/fluency-solving/FluencyNumpad.tsx +150 -0
- package/src/features/fluency/components/fluency-solving/FluencySolvingCard.tsx +49 -0
- package/src/features/fluency/components/fluency-solving/FluencySolvingHeader.tsx +67 -0
- package/src/features/fluency/components/fluency-solving/FluencySolvingProgress.tsx +40 -0
- package/src/features/fluency/components/matrix/FluencyMatrix.tsx +29 -0
- package/src/features/fluency/components/matrix/components/MatrixCell.tsx +46 -0
- package/src/features/fluency/components/matrix/components/MatrixFill.tsx +50 -0
- package/src/features/fluency/components/matrix/components/MatrixLegend.tsx +102 -0
- package/src/features/fluency/components/select-math-operator/MathOperatorRow.tsx +38 -0
- package/src/features/fluency/components/select-math-operator/ProgressBar.tsx +127 -0
- package/src/features/fluency/components/select-math-operator/SelectMathOperator.tsx +49 -0
- package/src/features/fluency/components/start-banner/BannerFlashcards.tsx +45 -0
- package/src/features/fluency/components/start-banner/MathFlashcard.tsx +69 -0
- package/src/features/fluency/components/start-banner/StartBanner.tsx +105 -0
- package/src/features/fluency/context/FluencyContext.ts +20 -0
- package/src/features/fluency/fluency.constants.ts +83 -0
- package/src/features/fluency/fluency.helpers.ts +71 -0
- package/src/features/fluency/fluency.types.ts +41 -0
- package/src/features/fluency/hooks/useFluencyModePreset.ts +24 -0
- package/src/features/fluency/index.ts +6 -0
- package/src/features/fluency/model/FluencyApiModel.ts +5 -0
- package/src/features/fluency/model/FluencyDaysStreakModel.ts +1 -0
- package/src/features/fluency/model/FluencyInputModel.ts +21 -0
- package/src/features/fluency/model/FluencyMatrixModel.ts +1 -0
- package/src/features/fluency/model/FluencyModel.ts +30 -0
- package/src/features/fluency/model/FluencySolvingModel.ts +1 -0
- package/src/i18n/.generated/schema.json +23 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
ButtonColor,
|
|
6
|
+
ButtonSize,
|
|
7
|
+
ButtonVariant,
|
|
8
|
+
Typography,
|
|
9
|
+
PlayIcon,
|
|
10
|
+
COLORS,
|
|
11
|
+
SHADOWS,
|
|
12
|
+
SPACING,
|
|
13
|
+
FONT_FAMILY,
|
|
14
|
+
BORDER_RADIUS,
|
|
15
|
+
} from '@magmamath/react-native-ui'
|
|
16
|
+
import { BannerFlashcards } from './BannerFlashcards'
|
|
17
|
+
import { useFluency } from '../../context/FluencyContext'
|
|
18
|
+
import { useText } from '../../../../i18n/i18n'
|
|
19
|
+
import { SpringIcon } from '../../assets/SpringIcon'
|
|
20
|
+
|
|
21
|
+
export const StartBanner = () => {
|
|
22
|
+
const t = useText()
|
|
23
|
+
const { onStartPress } = useFluency()
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<View style={styles.container}>
|
|
27
|
+
<View style={styles.buttonContainer}>
|
|
28
|
+
<View style={styles.buttonGroup}>
|
|
29
|
+
<Button
|
|
30
|
+
onPress={onStartPress}
|
|
31
|
+
disabled={false}
|
|
32
|
+
isLoading={false}
|
|
33
|
+
isActive={false}
|
|
34
|
+
icon={<PlayIcon color={COLORS.NEUTRAL_1} />}
|
|
35
|
+
variant={ButtonVariant.PRIMARY}
|
|
36
|
+
size={ButtonSize.LARGE}
|
|
37
|
+
colorScheme={ButtonColor.YELLOW}
|
|
38
|
+
raiseLevel={6}
|
|
39
|
+
style={{ container: styles.button }}
|
|
40
|
+
>
|
|
41
|
+
{t('student.fluency.startPractice')}
|
|
42
|
+
</Button>
|
|
43
|
+
<Typography style={styles.buttonSubtitle}>0 {t('student.fluency.cardsReady')}</Typography>
|
|
44
|
+
<View style={styles.springIcon}>
|
|
45
|
+
<SpringIcon />
|
|
46
|
+
</View>
|
|
47
|
+
</View>
|
|
48
|
+
</View>
|
|
49
|
+
|
|
50
|
+
<BannerFlashcards
|
|
51
|
+
examples={[
|
|
52
|
+
{ left: '15*', right: '=30' },
|
|
53
|
+
{ left: '10-', right: '=25' },
|
|
54
|
+
{ left: '5+', right: '=19' },
|
|
55
|
+
]}
|
|
56
|
+
/>
|
|
57
|
+
</View>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const styles = StyleSheet.create({
|
|
62
|
+
container: {
|
|
63
|
+
flex: 1,
|
|
64
|
+
height: '100%',
|
|
65
|
+
justifyContent: 'center',
|
|
66
|
+
paddingVertical: SPACING[400],
|
|
67
|
+
paddingHorizontal: SPACING[800],
|
|
68
|
+
borderRadius: BORDER_RADIUS[400],
|
|
69
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
70
|
+
...SHADOWS[1],
|
|
71
|
+
},
|
|
72
|
+
buttonContainer: {
|
|
73
|
+
alignItems: 'flex-start',
|
|
74
|
+
zIndex: 4,
|
|
75
|
+
},
|
|
76
|
+
buttonGroup: {
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
gap: SPACING[200],
|
|
79
|
+
},
|
|
80
|
+
button: {
|
|
81
|
+
minWidth: 220,
|
|
82
|
+
maxWidth: 315,
|
|
83
|
+
textTransform: 'uppercase',
|
|
84
|
+
},
|
|
85
|
+
buttonSubtitle: {
|
|
86
|
+
fontSize: 13,
|
|
87
|
+
fontWeight: '400',
|
|
88
|
+
color: COLORS.BLACK,
|
|
89
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
90
|
+
},
|
|
91
|
+
flashcard: {
|
|
92
|
+
position: 'absolute',
|
|
93
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
justifyContent: 'center',
|
|
96
|
+
...SHADOWS[1],
|
|
97
|
+
},
|
|
98
|
+
springIcon: {
|
|
99
|
+
position: 'absolute',
|
|
100
|
+
bottom: -28,
|
|
101
|
+
right: 0,
|
|
102
|
+
marginTop: 6,
|
|
103
|
+
alignSelf: 'flex-end',
|
|
104
|
+
},
|
|
105
|
+
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react'
|
|
2
|
+
import type { FluencyModel } from '../model/FluencyModel'
|
|
3
|
+
import type { FluencyMode } from '../fluency.constants'
|
|
4
|
+
|
|
5
|
+
export type FluencyContextValue = {
|
|
6
|
+
model: FluencyModel
|
|
7
|
+
onStartPress?: () => void
|
|
8
|
+
onPracticePress?: () => void
|
|
9
|
+
onModeSelectPress?: (mode: FluencyMode) => void
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const FluencyContext = createContext<FluencyContextValue | null>(null)
|
|
13
|
+
|
|
14
|
+
export const useFluency = (): FluencyContextValue => {
|
|
15
|
+
const value = useContext(FluencyContext)
|
|
16
|
+
if (!value) throw new Error('useFluency must be used within FluencyProvider')
|
|
17
|
+
return value
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const FluencyProvider = FluencyContext.Provider
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { CrossIcon, MinusIcon, PlusIcon } from '@magmamath/react-native-ui'
|
|
2
|
+
import { ButtonColor, COLORS, SelectOptionColor } from '@magmamath/react-native-ui'
|
|
3
|
+
import { createFluencyMode } from './fluency.helpers'
|
|
4
|
+
import type { FluencyColorPalette, FluencyModeConfig, FluencyModePreset } from './fluency.types'
|
|
5
|
+
import { DivideIcon } from './assets/DivideIcon'
|
|
6
|
+
|
|
7
|
+
export const MATRIX_SIZE = 21
|
|
8
|
+
export const MAX_INPUT_LENGTH = 3
|
|
9
|
+
|
|
10
|
+
export enum FluencyMode {
|
|
11
|
+
ADDITION = 'ADDITION',
|
|
12
|
+
SUBTRACTION = 'SUBTRACTION',
|
|
13
|
+
MULTIPLICATION = 'MULTIPLICATION',
|
|
14
|
+
DIVISION = 'DIVISION',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum FluencyMasteryLevel {
|
|
18
|
+
LEARNING = 'learning',
|
|
19
|
+
GROWING = 'growing',
|
|
20
|
+
STRONG = 'strong',
|
|
21
|
+
MASTERED = 'mastered',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum FluencyColorFamily {
|
|
25
|
+
GREEN = 'GREEN',
|
|
26
|
+
ORANGE = 'ORANGE',
|
|
27
|
+
BLUE = 'BLUE',
|
|
28
|
+
PURPLE = 'PURPLE',
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const COLOR_FAMILY_PALETTES: Record<FluencyColorFamily, FluencyColorPalette> = {
|
|
32
|
+
[FluencyColorFamily.GREEN]: {
|
|
33
|
+
shades: [COLORS.GREEN_2, COLORS.GREEN_3, COLORS.PRIMARY_GREEN, COLORS.GREEN_6],
|
|
34
|
+
button: ButtonColor.GREEN,
|
|
35
|
+
select: SelectOptionColor.GREEN,
|
|
36
|
+
},
|
|
37
|
+
[FluencyColorFamily.ORANGE]: {
|
|
38
|
+
shades: [COLORS.ORANGE_2, COLORS.ORANGE_3, COLORS.PRIMARY_ORANGE, COLORS.ORANGE_6],
|
|
39
|
+
button: ButtonColor.ORANGE,
|
|
40
|
+
select: SelectOptionColor.ORANGE,
|
|
41
|
+
},
|
|
42
|
+
[FluencyColorFamily.BLUE]: {
|
|
43
|
+
shades: [COLORS.BLUE_2, COLORS.BLUE_3, COLORS.PRIMARY_BLUE, COLORS.BLUE_6],
|
|
44
|
+
button: ButtonColor.BLUE,
|
|
45
|
+
select: SelectOptionColor.BLUE,
|
|
46
|
+
},
|
|
47
|
+
[FluencyColorFamily.PURPLE]: {
|
|
48
|
+
shades: [COLORS.PURPLE_2, COLORS.PURPLE_3, COLORS.PRIMARY_PURPLE, COLORS.PURPLE_6],
|
|
49
|
+
button: ButtonColor.PURPLE,
|
|
50
|
+
select: SelectOptionColor.PURPLE,
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const FLUENCY_MODES: readonly FluencyModeConfig[] = [
|
|
55
|
+
createFluencyMode({
|
|
56
|
+
mode: FluencyMode.ADDITION,
|
|
57
|
+
label: 'student.fluency.addition',
|
|
58
|
+
icon: PlusIcon,
|
|
59
|
+
colorFamily: FluencyColorFamily.GREEN,
|
|
60
|
+
}),
|
|
61
|
+
createFluencyMode({
|
|
62
|
+
mode: FluencyMode.SUBTRACTION,
|
|
63
|
+
label: 'student.fluency.subtraction',
|
|
64
|
+
icon: MinusIcon,
|
|
65
|
+
colorFamily: FluencyColorFamily.ORANGE,
|
|
66
|
+
}),
|
|
67
|
+
createFluencyMode({
|
|
68
|
+
mode: FluencyMode.MULTIPLICATION,
|
|
69
|
+
label: 'student.fluency.multiplication',
|
|
70
|
+
icon: CrossIcon,
|
|
71
|
+
colorFamily: FluencyColorFamily.BLUE,
|
|
72
|
+
}),
|
|
73
|
+
createFluencyMode({
|
|
74
|
+
mode: FluencyMode.DIVISION,
|
|
75
|
+
label: 'student.fluency.division',
|
|
76
|
+
icon: DivideIcon,
|
|
77
|
+
colorFamily: FluencyColorFamily.PURPLE,
|
|
78
|
+
}),
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
export const FLUENCY_MODE_PRESETS: Record<FluencyMode, FluencyModePreset> = Object.fromEntries(
|
|
82
|
+
FLUENCY_MODES.map(({ mode, preset }) => [mode, preset]),
|
|
83
|
+
) as Record<FluencyMode, FluencyModePreset>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
3
|
+
import {
|
|
4
|
+
FluencyColorFamily,
|
|
5
|
+
FluencyMasteryLevel,
|
|
6
|
+
FluencyMode,
|
|
7
|
+
COLOR_FAMILY_PALETTES,
|
|
8
|
+
} from './fluency.constants'
|
|
9
|
+
import type { FluencyModeConfig, FluencyModePreset } from './fluency.types'
|
|
10
|
+
import type { TranslationKey } from '../../i18n/i18n'
|
|
11
|
+
|
|
12
|
+
// TODO: Threshold values to be aligned with BE response schema.
|
|
13
|
+
export const getMasteryLevel = (score: number): FluencyMasteryLevel => {
|
|
14
|
+
if (score >= 80) return FluencyMasteryLevel.MASTERED
|
|
15
|
+
if (score >= 60) return FluencyMasteryLevel.STRONG
|
|
16
|
+
if (score >= 40) return FluencyMasteryLevel.GROWING
|
|
17
|
+
return FluencyMasteryLevel.LEARNING
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const getCellColorByScore = (
|
|
21
|
+
score: number,
|
|
22
|
+
mastery: FluencyModePreset['matrix']['mastery'],
|
|
23
|
+
): string => mastery[getMasteryLevel(score)]
|
|
24
|
+
|
|
25
|
+
export const getCellBackground = (row: number, col: number): string => {
|
|
26
|
+
if (row === 0 && col === 0) return COLORS.NEUTRAL_2
|
|
27
|
+
if (row === 0 || col === 0) return COLORS.NEUTRAL_5
|
|
28
|
+
return COLORS.NEUTRAL_2
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const getCellLabel = (row: number, col: number): number | null => {
|
|
32
|
+
if (row === 0 && col === 0) return null
|
|
33
|
+
if (row === 0) return col
|
|
34
|
+
if (col === 0) return row
|
|
35
|
+
return null
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type CreateFluencyModeParams = {
|
|
39
|
+
mode: FluencyMode
|
|
40
|
+
label: TranslationKey
|
|
41
|
+
icon: ComponentType<{ color?: string }>
|
|
42
|
+
colorFamily: FluencyColorFamily
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const createFluencyMode = ({
|
|
46
|
+
mode,
|
|
47
|
+
label,
|
|
48
|
+
icon,
|
|
49
|
+
colorFamily,
|
|
50
|
+
}: CreateFluencyModeParams): FluencyModeConfig => {
|
|
51
|
+
const palette = COLOR_FAMILY_PALETTES[colorFamily]
|
|
52
|
+
const [learning, growing, strong, mastered] = palette.shades
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
mode,
|
|
56
|
+
label,
|
|
57
|
+
icon,
|
|
58
|
+
select: palette.select,
|
|
59
|
+
preset: {
|
|
60
|
+
buttonColor: palette.button,
|
|
61
|
+
icon,
|
|
62
|
+
header: {
|
|
63
|
+
streakColor: { gained: growing, todayBorder: strong },
|
|
64
|
+
},
|
|
65
|
+
matrix: {
|
|
66
|
+
operatorName: label,
|
|
67
|
+
mastery: { learning, growing, strong, mastered },
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
import type { ButtonColor, SelectOptionColor } from '@magmamath/react-native-ui'
|
|
3
|
+
import type { FluencyMode } from './fluency.constants'
|
|
4
|
+
import type { TranslationKey } from '../../i18n/i18n'
|
|
5
|
+
|
|
6
|
+
export type LegendItem = {
|
|
7
|
+
label: string
|
|
8
|
+
color: string
|
|
9
|
+
withBorder?: boolean
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type FluencyColorPalette = {
|
|
13
|
+
shades: readonly [string, string, string, string]
|
|
14
|
+
button: ButtonColor
|
|
15
|
+
select: SelectOptionColor
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type FluencyModePreset = {
|
|
19
|
+
buttonColor: ButtonColor
|
|
20
|
+
icon: ComponentType<{ color?: string; size?: number }>
|
|
21
|
+
header: {
|
|
22
|
+
streakColor: { gained: string; todayBorder: string }
|
|
23
|
+
}
|
|
24
|
+
matrix: {
|
|
25
|
+
operatorName: TranslationKey
|
|
26
|
+
mastery: {
|
|
27
|
+
learning: string
|
|
28
|
+
growing: string
|
|
29
|
+
strong: string
|
|
30
|
+
mastered: string
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type FluencyModeConfig = {
|
|
36
|
+
mode: FluencyMode
|
|
37
|
+
label: TranslationKey
|
|
38
|
+
icon: ComponentType<{ color?: string }>
|
|
39
|
+
select: SelectOptionColor
|
|
40
|
+
preset: FluencyModePreset
|
|
41
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useUnit } from 'effector-react'
|
|
2
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
3
|
+
import { FLUENCY_MODE_PRESETS, FluencyMasteryLevel } from '../fluency.constants'
|
|
4
|
+
import type { FluencyModePreset, LegendItem } from '../fluency.types'
|
|
5
|
+
import { useFluency } from '../context/FluencyContext'
|
|
6
|
+
import { useText } from '../../../i18n/i18n'
|
|
7
|
+
|
|
8
|
+
type UseFluencyModePresetResult = FluencyModePreset & { legendItems: LegendItem[] }
|
|
9
|
+
|
|
10
|
+
export const useFluencyModePreset = (): UseFluencyModePresetResult => {
|
|
11
|
+
const t = useText()
|
|
12
|
+
const mode = useUnit(useFluency().model.$mode)
|
|
13
|
+
const preset = FLUENCY_MODE_PRESETS[mode]
|
|
14
|
+
|
|
15
|
+
const legendItems: LegendItem[] = [
|
|
16
|
+
{ label: t('student.fluency.notStarted'), color: COLORS.NEUTRAL_2, withBorder: true },
|
|
17
|
+
{ label: t('student.fluency.masteryLearning'), color: preset.matrix.mastery[FluencyMasteryLevel.LEARNING] },
|
|
18
|
+
{ label: t('student.fluency.masteryGrowing'), color: preset.matrix.mastery[FluencyMasteryLevel.GROWING] },
|
|
19
|
+
{ label: t('student.fluency.masteryStrong'), color: preset.matrix.mastery[FluencyMasteryLevel.STRONG] },
|
|
20
|
+
{ label: t('student.fluency.masteryMastered'), color: preset.matrix.mastery[FluencyMasteryLevel.MASTERED] },
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
return { ...preset, legendItems }
|
|
24
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './fluency.constants'
|
|
2
|
+
export * from './fluency.types'
|
|
3
|
+
export * from './fluency.helpers'
|
|
4
|
+
export { Fluency } from './components/Fluency'
|
|
5
|
+
export { FluencySolving } from './components/FluencySolving'
|
|
6
|
+
export { FluencyModel } from './model/FluencyModel'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export class FluencyDaysStreakModel {}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createEffect, createEvent, createStore } from 'effector'
|
|
2
|
+
import { MAX_INPUT_LENGTH } from '../fluency.constants'
|
|
3
|
+
|
|
4
|
+
type SetPayload = { value: number } | { erase: 'latest' | 'all' }
|
|
5
|
+
|
|
6
|
+
export class FluencyInputModel {
|
|
7
|
+
public readonly set = createEvent<SetPayload>()
|
|
8
|
+
public readonly $state = createStore('').on(this.set, (input, payload) => {
|
|
9
|
+
const isEraseAction = 'erase' in payload
|
|
10
|
+
if (isEraseAction) return payload.erase === 'all' ? '' : input.slice(0, -1)
|
|
11
|
+
|
|
12
|
+
const isDisabled = input.length >= MAX_INPUT_LENGTH || input === '0'
|
|
13
|
+
if (isDisabled) return input
|
|
14
|
+
|
|
15
|
+
return input + payload.value
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
public readonly submitFx = createEffect(() => {
|
|
19
|
+
console.log('submit')
|
|
20
|
+
})
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export class FluencyMatrixModel {}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createEvent, restore } from 'effector'
|
|
2
|
+
import { FluencyMode } from '../fluency.constants'
|
|
3
|
+
import { FluencyDaysStreakModel } from './FluencyDaysStreakModel'
|
|
4
|
+
import { FluencyMatrixModel } from './FluencyMatrixModel'
|
|
5
|
+
import { FluencyApiModel } from './FluencyApiModel'
|
|
6
|
+
import { FluencySolvingModel } from './FluencySolvingModel'
|
|
7
|
+
import { FluencyInputModel } from './FluencyInputModel'
|
|
8
|
+
|
|
9
|
+
type FluencyModelProps = {
|
|
10
|
+
api: {}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class FluencyModel {
|
|
14
|
+
public readonly api: FluencyApiModel
|
|
15
|
+
public readonly streak: FluencyDaysStreakModel
|
|
16
|
+
public readonly matrix: FluencyMatrixModel
|
|
17
|
+
public readonly solving: FluencySolvingModel
|
|
18
|
+
public readonly input: FluencyInputModel
|
|
19
|
+
|
|
20
|
+
public readonly setMode = createEvent<FluencyMode>()
|
|
21
|
+
public readonly $mode = restore(this.setMode, FluencyMode.ADDITION)
|
|
22
|
+
|
|
23
|
+
constructor({ api }: FluencyModelProps) {
|
|
24
|
+
this.api = new FluencyApiModel(api)
|
|
25
|
+
this.streak = new FluencyDaysStreakModel()
|
|
26
|
+
this.matrix = new FluencyMatrixModel()
|
|
27
|
+
this.solving = new FluencySolvingModel()
|
|
28
|
+
this.input = new FluencyInputModel()
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export class FluencySolvingModel {}
|
|
@@ -54,6 +54,29 @@
|
|
|
54
54
|
"time": "Practice time",
|
|
55
55
|
"title": "Practice & Progress"
|
|
56
56
|
},
|
|
57
|
+
"student": {
|
|
58
|
+
"fluency": {
|
|
59
|
+
"addition": "Addition",
|
|
60
|
+
"cardsReady": "new cards ready",
|
|
61
|
+
"dayFriday": "F",
|
|
62
|
+
"dayMonday": "M",
|
|
63
|
+
"dayThursday": "T",
|
|
64
|
+
"dayTuesday": "T",
|
|
65
|
+
"dayWednesday": "W",
|
|
66
|
+
"division": "Division",
|
|
67
|
+
"masteryGrowing": "Growing",
|
|
68
|
+
"masteryLearning": "Learning",
|
|
69
|
+
"masteryMastered": "Mastered",
|
|
70
|
+
"masteryStrong": "Strong",
|
|
71
|
+
"multiplication": "Multiplication",
|
|
72
|
+
"notStarted": "Not started",
|
|
73
|
+
"practice": "Practice",
|
|
74
|
+
"practiceThisWeek": "Practice this week",
|
|
75
|
+
"startPractice": "Start fluency practice",
|
|
76
|
+
"subtraction": "Subtraction",
|
|
77
|
+
"title": "Fluency practice"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
57
80
|
"teacherFeedback": {
|
|
58
81
|
"noComments": "No comments yet"
|
|
59
82
|
},
|
package/src/index.ts
CHANGED