@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,67 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
BORDER_RADIUS,
|
|
5
|
+
Button,
|
|
6
|
+
ButtonSize,
|
|
7
|
+
ButtonVariant,
|
|
8
|
+
COLORS,
|
|
9
|
+
HeadingVariants,
|
|
10
|
+
SHADOWS,
|
|
11
|
+
SPACING,
|
|
12
|
+
Typography,
|
|
13
|
+
} from '@magmamath/react-native-ui'
|
|
14
|
+
import { useText } from '../../../../i18n/i18n'
|
|
15
|
+
import { useFluencyModePreset } from '../../hooks/useFluencyModePreset'
|
|
16
|
+
import { XCloseIcon } from '../../../../shared/icons/XCloseIcon'
|
|
17
|
+
|
|
18
|
+
type FluencySolvingHeaderProps = {
|
|
19
|
+
onClosePress?: () => void
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const FluencySolvingHeader = ({ onClosePress }: FluencySolvingHeaderProps) => {
|
|
23
|
+
const t = useText()
|
|
24
|
+
const { matrix, header, icon: OperatorIcon } = useFluencyModePreset()
|
|
25
|
+
const accentColor = header.streakColor.todayBorder
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<View style={styles.container}>
|
|
29
|
+
<Button
|
|
30
|
+
variant={ButtonVariant.SECONDARY}
|
|
31
|
+
size={ButtonSize.LARGE}
|
|
32
|
+
icon={<XCloseIcon />}
|
|
33
|
+
onPress={onClosePress}
|
|
34
|
+
/>
|
|
35
|
+
<View style={[styles.operatorBadge, { backgroundColor: accentColor }]}>
|
|
36
|
+
<OperatorIcon color={COLORS.NEUTRAL_1} size={16} />
|
|
37
|
+
</View>
|
|
38
|
+
<Typography variant={HeadingVariants.H4} style={styles.title}>
|
|
39
|
+
{t(matrix.operatorName)}
|
|
40
|
+
</Typography>
|
|
41
|
+
</View>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const styles = StyleSheet.create({
|
|
46
|
+
container: {
|
|
47
|
+
height: 76,
|
|
48
|
+
flexDirection: 'row',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
gap: 14,
|
|
51
|
+
paddingVertical: SPACING[400],
|
|
52
|
+
paddingHorizontal: SPACING[600],
|
|
53
|
+
...SHADOWS[1],
|
|
54
|
+
},
|
|
55
|
+
operatorBadge: {
|
|
56
|
+
width: 32,
|
|
57
|
+
height: 32,
|
|
58
|
+
borderRadius: BORDER_RADIUS[200],
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
justifyContent: 'center',
|
|
61
|
+
...SHADOWS[1],
|
|
62
|
+
},
|
|
63
|
+
title: {
|
|
64
|
+
color: COLORS.NEUTRAL_10,
|
|
65
|
+
fontWeight: '700',
|
|
66
|
+
},
|
|
67
|
+
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { COLORS, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
type FluencySolvingProgressProps = {
|
|
6
|
+
total: number
|
|
7
|
+
activeIndex: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const FluencySolvingProgress = ({ total, activeIndex }: FluencySolvingProgressProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<View style={styles.container}>
|
|
13
|
+
{Array.from({ length: total }).map((_, index) => (
|
|
14
|
+
<View key={index} style={index === activeIndex ? styles.dotActive : styles.dot} />
|
|
15
|
+
))}
|
|
16
|
+
</View>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
container: {
|
|
22
|
+
flexDirection: 'row',
|
|
23
|
+
gap: SPACING[200],
|
|
24
|
+
paddingHorizontal: SPACING[600],
|
|
25
|
+
paddingVertical: 14,
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
},
|
|
28
|
+
dot: {
|
|
29
|
+
width: 12,
|
|
30
|
+
height: 12,
|
|
31
|
+
borderRadius: 6,
|
|
32
|
+
backgroundColor: COLORS.NEUTRAL_4,
|
|
33
|
+
},
|
|
34
|
+
dotActive: {
|
|
35
|
+
width: 34,
|
|
36
|
+
height: 12,
|
|
37
|
+
backgroundColor: COLORS.NEUTRAL_10,
|
|
38
|
+
borderRadius: 9999,
|
|
39
|
+
},
|
|
40
|
+
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, SHADOWS, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
import { MatrixLegend } from './components/MatrixLegend'
|
|
5
|
+
import { MatrixFill } from './components/MatrixFill'
|
|
6
|
+
|
|
7
|
+
export const FluencyMatrix = () => (
|
|
8
|
+
<View style={styles.container}>
|
|
9
|
+
<View style={styles.body}>
|
|
10
|
+
<MatrixFill />
|
|
11
|
+
</View>
|
|
12
|
+
<MatrixLegend />
|
|
13
|
+
</View>
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
const styles = StyleSheet.create({
|
|
17
|
+
container: {
|
|
18
|
+
flex: 1,
|
|
19
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
20
|
+
borderRadius: BORDER_RADIUS[400],
|
|
21
|
+
overflow: 'hidden',
|
|
22
|
+
...SHADOWS[1],
|
|
23
|
+
},
|
|
24
|
+
body: {
|
|
25
|
+
flex: 1,
|
|
26
|
+
padding: SPACING[300],
|
|
27
|
+
minHeight: 354,
|
|
28
|
+
},
|
|
29
|
+
})
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS } from '@magmamath/react-native-ui'
|
|
4
|
+
import {
|
|
5
|
+
getCellBackground,
|
|
6
|
+
getCellColorByScore,
|
|
7
|
+
getCellLabel,
|
|
8
|
+
getMasteryLevel,
|
|
9
|
+
} from '../../../fluency.helpers'
|
|
10
|
+
import { FluencyMasteryLevel } from '../../../fluency.constants'
|
|
11
|
+
import { StarFillIcon } from '../../../assets/StarFillIcon'
|
|
12
|
+
import type { FluencyModePreset } from '../../../fluency.types'
|
|
13
|
+
|
|
14
|
+
type MatrixCellProps = {
|
|
15
|
+
row: number
|
|
16
|
+
col: number
|
|
17
|
+
score: number | null
|
|
18
|
+
mastery: FluencyModePreset['matrix']['mastery']
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const MatrixCell = ({ row, col, score, mastery }: MatrixCellProps) => {
|
|
22
|
+
const label = getCellLabel(row, col)
|
|
23
|
+
const isMastered = score !== null && getMasteryLevel(score) === FluencyMasteryLevel.MASTERED
|
|
24
|
+
const background =
|
|
25
|
+
score !== null ? getCellColorByScore(score, mastery) : getCellBackground(row, col)
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<View style={[styles.cell, { backgroundColor: background }]}>
|
|
29
|
+
{isMastered && <StarFillIcon />}
|
|
30
|
+
{label !== null && <Text style={styles.headerText}>{label}</Text>}
|
|
31
|
+
</View>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const styles = StyleSheet.create({
|
|
36
|
+
cell: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
borderRadius: BORDER_RADIUS[100],
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
justifyContent: 'center',
|
|
41
|
+
},
|
|
42
|
+
headerText: {
|
|
43
|
+
fontSize: 13,
|
|
44
|
+
color: COLORS.NEUTRAL_2,
|
|
45
|
+
},
|
|
46
|
+
})
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
import { MatrixCell } from './MatrixCell'
|
|
5
|
+
import { MATRIX_SIZE } from '../../../fluency.constants'
|
|
6
|
+
import { useFluencyModePreset } from '../../../hooks/useFluencyModePreset'
|
|
7
|
+
|
|
8
|
+
const MOCK_SCORES: Record<string, number> = {
|
|
9
|
+
'1-1': 90,
|
|
10
|
+
'2-3': 70,
|
|
11
|
+
'3-5': 50,
|
|
12
|
+
'5-2': 30,
|
|
13
|
+
'4-4': 10,
|
|
14
|
+
'1-5': 85,
|
|
15
|
+
'3-3': 45,
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const MatrixFill = () => {
|
|
19
|
+
const { matrix } = useFluencyModePreset()
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<View style={styles.grid}>
|
|
23
|
+
{Array.from({ length: MATRIX_SIZE }, (_, row) => (
|
|
24
|
+
<View key={row} style={styles.row}>
|
|
25
|
+
{Array.from({ length: MATRIX_SIZE }, (_, col) => (
|
|
26
|
+
<MatrixCell
|
|
27
|
+
key={col}
|
|
28
|
+
row={row}
|
|
29
|
+
col={col}
|
|
30
|
+
score={MOCK_SCORES[`${row}-${col}`] ?? null}
|
|
31
|
+
mastery={matrix.mastery}
|
|
32
|
+
/>
|
|
33
|
+
))}
|
|
34
|
+
</View>
|
|
35
|
+
))}
|
|
36
|
+
</View>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const styles = StyleSheet.create({
|
|
41
|
+
grid: {
|
|
42
|
+
flex: 1,
|
|
43
|
+
gap: SPACING[50],
|
|
44
|
+
},
|
|
45
|
+
row: {
|
|
46
|
+
flex: 1,
|
|
47
|
+
flexDirection: 'row',
|
|
48
|
+
gap: SPACING[50],
|
|
49
|
+
},
|
|
50
|
+
})
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
BORDER_RADIUS,
|
|
5
|
+
Button,
|
|
6
|
+
ButtonSize,
|
|
7
|
+
ButtonVariant,
|
|
8
|
+
COLORS,
|
|
9
|
+
PlayIcon,
|
|
10
|
+
SHADOWS,
|
|
11
|
+
SPACING,
|
|
12
|
+
} from '@magmamath/react-native-ui'
|
|
13
|
+
import { useFluencyModePreset } from '../../../hooks/useFluencyModePreset'
|
|
14
|
+
import { useFluency } from '../../../context/FluencyContext'
|
|
15
|
+
import { useText } from '../../../../../i18n/i18n'
|
|
16
|
+
|
|
17
|
+
const LEGEND_DOT_SIZE = 14
|
|
18
|
+
const LEGEND_DOT_BORDER_RADIUS = 3
|
|
19
|
+
const LEGEND_LABEL_FONT_SIZE = 12
|
|
20
|
+
|
|
21
|
+
type MatrixLegendProps = {}
|
|
22
|
+
|
|
23
|
+
export const MatrixLegend = ({}: MatrixLegendProps) => {
|
|
24
|
+
const t = useText()
|
|
25
|
+
const { matrix, buttonColor, legendItems } = useFluencyModePreset()
|
|
26
|
+
const { onPracticePress } = useFluency()
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<View style={styles.container}>
|
|
30
|
+
<View style={styles.legendItems}>
|
|
31
|
+
{legendItems.map((item) => (
|
|
32
|
+
<View key={item.label} style={styles.legendItem}>
|
|
33
|
+
<View
|
|
34
|
+
style={[
|
|
35
|
+
styles.legendDot,
|
|
36
|
+
{ backgroundColor: item.color },
|
|
37
|
+
item.withBorder && styles.legendDotBorder,
|
|
38
|
+
]}
|
|
39
|
+
/>
|
|
40
|
+
<Text style={styles.legendLabel}>{item.label}</Text>
|
|
41
|
+
</View>
|
|
42
|
+
))}
|
|
43
|
+
</View>
|
|
44
|
+
<Button
|
|
45
|
+
onPress={onPracticePress}
|
|
46
|
+
variant={ButtonVariant.PRIMARY}
|
|
47
|
+
size={ButtonSize.MEDIUM}
|
|
48
|
+
colorScheme={buttonColor}
|
|
49
|
+
icon={<PlayIcon color={COLORS.NEUTRAL_1} />}
|
|
50
|
+
raiseLevel={3}
|
|
51
|
+
style={{ container: styles.practiceButton, text: styles.practiceButtonText }}
|
|
52
|
+
>
|
|
53
|
+
{`${t('student.fluency.practice')} ${t(matrix.operatorName)}`}
|
|
54
|
+
</Button>
|
|
55
|
+
</View>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const styles = StyleSheet.create({
|
|
60
|
+
container: {
|
|
61
|
+
height: 65,
|
|
62
|
+
flexDirection: 'row',
|
|
63
|
+
alignItems: 'flex-end',
|
|
64
|
+
justifyContent: 'space-between',
|
|
65
|
+
backgroundColor: COLORS.NEUTRAL_2,
|
|
66
|
+
borderBottomColor: COLORS.NEUTRAL_5,
|
|
67
|
+
paddingHorizontal: SPACING[300],
|
|
68
|
+
paddingVertical: SPACING[300],
|
|
69
|
+
borderTopLeftRadius: BORDER_RADIUS[400],
|
|
70
|
+
borderTopRightRadius: BORDER_RADIUS[400],
|
|
71
|
+
...SHADOWS[1],
|
|
72
|
+
},
|
|
73
|
+
legendItems: {
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
alignItems: 'center',
|
|
76
|
+
gap: SPACING[400],
|
|
77
|
+
},
|
|
78
|
+
legendItem: {
|
|
79
|
+
flexDirection: 'row',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
gap: SPACING[150],
|
|
82
|
+
},
|
|
83
|
+
legendDot: {
|
|
84
|
+
width: LEGEND_DOT_SIZE,
|
|
85
|
+
height: LEGEND_DOT_SIZE,
|
|
86
|
+
borderRadius: LEGEND_DOT_BORDER_RADIUS,
|
|
87
|
+
},
|
|
88
|
+
legendDotBorder: {
|
|
89
|
+
borderWidth: 0.5,
|
|
90
|
+
borderColor: COLORS.NEUTRAL_5,
|
|
91
|
+
},
|
|
92
|
+
legendLabel: {
|
|
93
|
+
fontSize: LEGEND_LABEL_FONT_SIZE,
|
|
94
|
+
color: COLORS.NEUTRAL_7,
|
|
95
|
+
},
|
|
96
|
+
practiceButton: {
|
|
97
|
+
alignSelf: 'center',
|
|
98
|
+
},
|
|
99
|
+
practiceButtonText: {
|
|
100
|
+
textTransform: 'uppercase',
|
|
101
|
+
},
|
|
102
|
+
})
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { COLORS, SelectOption, SelectOptionColor, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
import { ProgressBar } from './ProgressBar'
|
|
5
|
+
|
|
6
|
+
export type MathOperatorRowProps = {
|
|
7
|
+
title: string
|
|
8
|
+
icon: ReactNode
|
|
9
|
+
progress: number
|
|
10
|
+
color: SelectOptionColor
|
|
11
|
+
selected: boolean
|
|
12
|
+
onSelect: () => void
|
|
13
|
+
showDivider?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const MathOperatorRow = ({
|
|
17
|
+
title,
|
|
18
|
+
icon,
|
|
19
|
+
progress,
|
|
20
|
+
color,
|
|
21
|
+
selected,
|
|
22
|
+
onSelect,
|
|
23
|
+
showDivider = true,
|
|
24
|
+
}: MathOperatorRowProps) => (
|
|
25
|
+
<View>
|
|
26
|
+
<SelectOption title={title} icon={icon} color={color} selected={selected} onPress={onSelect} />
|
|
27
|
+
<ProgressBar progress={progress} color={color} />
|
|
28
|
+
{showDivider && <View style={styles.divider} />}
|
|
29
|
+
</View>
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
const styles = StyleSheet.create({
|
|
33
|
+
divider: {
|
|
34
|
+
height: 1,
|
|
35
|
+
backgroundColor: COLORS.NEUTRAL_3,
|
|
36
|
+
marginVertical: SPACING[600],
|
|
37
|
+
},
|
|
38
|
+
})
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
BORDER_RADIUS,
|
|
5
|
+
COLORS,
|
|
6
|
+
HeadingVariants,
|
|
7
|
+
SelectOptionColor,
|
|
8
|
+
SPACING,
|
|
9
|
+
Typography,
|
|
10
|
+
} from '@magmamath/react-native-ui'
|
|
11
|
+
|
|
12
|
+
type ProgressShades = {
|
|
13
|
+
low: string
|
|
14
|
+
medium: string
|
|
15
|
+
high: string
|
|
16
|
+
max: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const PROGRESS_COLOR_SHADES: Record<SelectOptionColor, ProgressShades> = {
|
|
20
|
+
[SelectOptionColor.GREEN]: {
|
|
21
|
+
low: COLORS.GREEN_2,
|
|
22
|
+
medium: COLORS.GREEN_3,
|
|
23
|
+
high: COLORS.GREEN_6,
|
|
24
|
+
max: COLORS.GREEN_7,
|
|
25
|
+
},
|
|
26
|
+
[SelectOptionColor.ORANGE]: {
|
|
27
|
+
low: COLORS.ORANGE_2,
|
|
28
|
+
medium: COLORS.ORANGE_3,
|
|
29
|
+
high: COLORS.ORANGE_6,
|
|
30
|
+
max: COLORS.ORANGE_7,
|
|
31
|
+
},
|
|
32
|
+
[SelectOptionColor.BLUE]: {
|
|
33
|
+
low: COLORS.BLUE_2,
|
|
34
|
+
medium: COLORS.BLUE_3,
|
|
35
|
+
high: COLORS.BLUE_6,
|
|
36
|
+
max: COLORS.BLUE_7,
|
|
37
|
+
},
|
|
38
|
+
[SelectOptionColor.RED]: {
|
|
39
|
+
low: COLORS.RED_2,
|
|
40
|
+
medium: COLORS.RED_3,
|
|
41
|
+
high: COLORS.RED_6,
|
|
42
|
+
max: COLORS.RED_7,
|
|
43
|
+
},
|
|
44
|
+
[SelectOptionColor.YELLOW]: {
|
|
45
|
+
low: COLORS.YELLOW_2,
|
|
46
|
+
medium: COLORS.YELLOW_3,
|
|
47
|
+
high: COLORS.YELLOW_6,
|
|
48
|
+
max: COLORS.YELLOW_7,
|
|
49
|
+
},
|
|
50
|
+
[SelectOptionColor.PURPLE]: {
|
|
51
|
+
low: COLORS.PURPLE_2,
|
|
52
|
+
medium: COLORS.PURPLE_3,
|
|
53
|
+
high: COLORS.PURPLE_6,
|
|
54
|
+
max: COLORS.PURPLE_7,
|
|
55
|
+
},
|
|
56
|
+
[SelectOptionColor.GREY]: {
|
|
57
|
+
low: COLORS.NEUTRAL_2,
|
|
58
|
+
medium: COLORS.NEUTRAL_3,
|
|
59
|
+
high: COLORS.NEUTRAL_6,
|
|
60
|
+
max: COLORS.NEUTRAL_7,
|
|
61
|
+
},
|
|
62
|
+
[SelectOptionColor.SUNSET]: {
|
|
63
|
+
low: COLORS.RED_2,
|
|
64
|
+
medium: COLORS.RED_3,
|
|
65
|
+
high: COLORS.RED_6,
|
|
66
|
+
max: COLORS.RED_7,
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const PRIMARY_COLOR_MAP: Record<SelectOptionColor, string> = {
|
|
71
|
+
[SelectOptionColor.GREEN]: COLORS.PRIMARY_GREEN,
|
|
72
|
+
[SelectOptionColor.ORANGE]: COLORS.PRIMARY_ORANGE,
|
|
73
|
+
[SelectOptionColor.BLUE]: COLORS.PRIMARY_BLUE,
|
|
74
|
+
[SelectOptionColor.RED]: COLORS.PRIMARY_RED,
|
|
75
|
+
[SelectOptionColor.YELLOW]: COLORS.PRIMARY_YELLOW,
|
|
76
|
+
[SelectOptionColor.PURPLE]: COLORS.PRIMARY_PURPLE,
|
|
77
|
+
[SelectOptionColor.GREY]: COLORS.NEUTRAL_6,
|
|
78
|
+
[SelectOptionColor.SUNSET]: COLORS.PRIMARY_RED,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const getFillColor = (shades: ProgressShades, progress: number): string => {
|
|
82
|
+
if (progress <= 10) return shades.low
|
|
83
|
+
if (progress <= 20) return shades.medium
|
|
84
|
+
if (progress <= 80) return shades.high
|
|
85
|
+
return shades.max
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type ProgressBarProps = {
|
|
89
|
+
progress: number
|
|
90
|
+
color: SelectOptionColor
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const ProgressBar = ({ progress, color = SelectOptionColor.GREEN }: ProgressBarProps) => {
|
|
94
|
+
const normalized = Math.round(Math.min(100, Math.max(0, progress)))
|
|
95
|
+
const fillColor = getFillColor(PROGRESS_COLOR_SHADES[color], normalized)
|
|
96
|
+
const textColor = PRIMARY_COLOR_MAP[color]
|
|
97
|
+
return (
|
|
98
|
+
<View style={styles.container}>
|
|
99
|
+
<View style={styles.track}>
|
|
100
|
+
<View style={[styles.fill, { backgroundColor: fillColor, width: `${normalized}%` }]} />
|
|
101
|
+
</View>
|
|
102
|
+
<Typography variant={HeadingVariants.H10} style={{ color: textColor }}>
|
|
103
|
+
{normalized}%
|
|
104
|
+
</Typography>
|
|
105
|
+
</View>
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const styles = StyleSheet.create({
|
|
110
|
+
container: {
|
|
111
|
+
flexDirection: 'row',
|
|
112
|
+
marginTop: SPACING[200],
|
|
113
|
+
gap: SPACING[200],
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
},
|
|
116
|
+
track: {
|
|
117
|
+
flex: 1,
|
|
118
|
+
height: 18,
|
|
119
|
+
backgroundColor: COLORS.NEUTRAL_3,
|
|
120
|
+
borderRadius: BORDER_RADIUS[450],
|
|
121
|
+
overflow: 'hidden',
|
|
122
|
+
},
|
|
123
|
+
fill: {
|
|
124
|
+
height: '100%',
|
|
125
|
+
borderRadius: BORDER_RADIUS[450],
|
|
126
|
+
},
|
|
127
|
+
})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, SHADOWS, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
import { useUnit } from 'effector-react'
|
|
5
|
+
import { FLUENCY_MODES } from '../../fluency.constants'
|
|
6
|
+
import { MathOperatorRow } from './MathOperatorRow'
|
|
7
|
+
import { useFluency } from '../../context/FluencyContext'
|
|
8
|
+
import { useText } from '../../../../i18n/i18n'
|
|
9
|
+
|
|
10
|
+
export const SelectMathOperator = () => {
|
|
11
|
+
const t = useText()
|
|
12
|
+
const { model, onModeSelectPress } = useFluency()
|
|
13
|
+
const fluencyMode = useUnit(model.$mode)
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<View style={styles.container}>
|
|
17
|
+
{FLUENCY_MODES.map(({ mode, label, icon: Icon, select }, index) => {
|
|
18
|
+
const isSelectedMode = mode === fluencyMode
|
|
19
|
+
return (
|
|
20
|
+
<MathOperatorRow
|
|
21
|
+
key={mode}
|
|
22
|
+
title={t(label)}
|
|
23
|
+
icon={<Icon color={isSelectedMode ? COLORS.NEUTRAL_1 : undefined} />}
|
|
24
|
+
// progress={0}
|
|
25
|
+
progress={Math.random() * 100}
|
|
26
|
+
color={select}
|
|
27
|
+
selected={isSelectedMode}
|
|
28
|
+
onSelect={() => {
|
|
29
|
+
model.setMode(mode)
|
|
30
|
+
onModeSelectPress?.(mode)
|
|
31
|
+
}}
|
|
32
|
+
showDivider={index < FLUENCY_MODES.length - 1}
|
|
33
|
+
/>
|
|
34
|
+
)
|
|
35
|
+
})}
|
|
36
|
+
</View>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const styles = StyleSheet.create({
|
|
41
|
+
container: {
|
|
42
|
+
width: 270,
|
|
43
|
+
paddingVertical: SPACING[400],
|
|
44
|
+
paddingHorizontal: SPACING[200],
|
|
45
|
+
borderRadius: BORDER_RADIUS[400],
|
|
46
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
47
|
+
...SHADOWS[1],
|
|
48
|
+
},
|
|
49
|
+
})
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { MathFlashcard, FlashcardLayout } from './MathFlashcard'
|
|
3
|
+
|
|
4
|
+
export type FlashcardExample = {
|
|
5
|
+
left: string
|
|
6
|
+
right: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const CARD_LAYOUTS: FlashcardLayout[] = [
|
|
10
|
+
{
|
|
11
|
+
card: { width: 146, height: 88, radius: 6 },
|
|
12
|
+
answer: { width: 20, height: 29, radius: 4 },
|
|
13
|
+
fontSize: 26,
|
|
14
|
+
position: { right: 283, top: 31, zIndex: 1 },
|
|
15
|
+
rotation: '21.3deg',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
card: { width: 195, height: 118, radius: 9 },
|
|
19
|
+
answer: { width: 27, height: 38, radius: 6 },
|
|
20
|
+
fontSize: 35,
|
|
21
|
+
position: { right: 148, top: -6, zIndex: 2 },
|
|
22
|
+
rotation: '-15.43deg',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
card: { width: 260, height: 157, radius: 12 },
|
|
26
|
+
answer: { width: 36, height: 51, radius: 8 },
|
|
27
|
+
fontSize: 46,
|
|
28
|
+
position: { right: 0, top: -11, zIndex: 3 },
|
|
29
|
+
rotation: '8.83deg',
|
|
30
|
+
},
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
type BannerFlashcardsProps = {
|
|
34
|
+
examples: FlashcardExample[]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const BannerFlashcards = ({ examples }: BannerFlashcardsProps) => (
|
|
38
|
+
<>
|
|
39
|
+
{CARD_LAYOUTS.map((layout, index) => {
|
|
40
|
+
const example = examples[index]
|
|
41
|
+
if (!example) return null
|
|
42
|
+
return <MathFlashcard key={index} left={example.left} right={example.right} layout={layout} />
|
|
43
|
+
})}
|
|
44
|
+
</>
|
|
45
|
+
)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native'
|
|
3
|
+
import { COLORS, SHADOWS } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
export type FlashcardLayout = {
|
|
6
|
+
card: { width: number; height: number; radius: number }
|
|
7
|
+
answer: { width: number; height: number; radius: number }
|
|
8
|
+
fontSize: number
|
|
9
|
+
position: { right: number; top: number; zIndex: number }
|
|
10
|
+
rotation: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type MathFlashcardProps = {
|
|
14
|
+
left: string
|
|
15
|
+
right: string
|
|
16
|
+
layout: FlashcardLayout
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const MathFlashcard = ({ left, right, layout }: MathFlashcardProps) => (
|
|
20
|
+
<View
|
|
21
|
+
style={[
|
|
22
|
+
styles.card,
|
|
23
|
+
{
|
|
24
|
+
width: layout.card.width,
|
|
25
|
+
height: layout.card.height,
|
|
26
|
+
borderRadius: layout.card.radius,
|
|
27
|
+
right: layout.position.right,
|
|
28
|
+
top: layout.position.top,
|
|
29
|
+
zIndex: layout.position.zIndex,
|
|
30
|
+
transform: [{ rotate: layout.rotation }],
|
|
31
|
+
},
|
|
32
|
+
]}
|
|
33
|
+
>
|
|
34
|
+
<View style={styles.row}>
|
|
35
|
+
<Text style={[styles.text, { fontSize: layout.fontSize }]}>{left}</Text>
|
|
36
|
+
<View
|
|
37
|
+
style={[
|
|
38
|
+
styles.answerBox,
|
|
39
|
+
{ width: layout.answer.width, height: layout.answer.height, borderRadius: layout.answer.radius },
|
|
40
|
+
]}
|
|
41
|
+
/>
|
|
42
|
+
<Text style={[styles.text, { fontSize: layout.fontSize }]}>{right}</Text>
|
|
43
|
+
</View>
|
|
44
|
+
</View>
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
card: {
|
|
49
|
+
position: 'absolute',
|
|
50
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
justifyContent: 'center',
|
|
53
|
+
...SHADOWS[1],
|
|
54
|
+
},
|
|
55
|
+
row: {
|
|
56
|
+
flexDirection: 'row',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
gap: 1,
|
|
59
|
+
},
|
|
60
|
+
text: {
|
|
61
|
+
fontWeight: 'bold',
|
|
62
|
+
color: COLORS.BLACK,
|
|
63
|
+
},
|
|
64
|
+
answerBox: {
|
|
65
|
+
backgroundColor: COLORS.NEUTRAL_2,
|
|
66
|
+
borderWidth: 1,
|
|
67
|
+
borderColor: COLORS.NEUTRAL_5,
|
|
68
|
+
},
|
|
69
|
+
})
|