@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,21 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
type DivideIconProps = {
|
|
6
|
+
size?: number
|
|
7
|
+
color?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const DivideIcon = ({ size = 20, color = COLORS.NEUTRAL_9 }: DivideIconProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<Svg width={size} height={size} viewBox="0 0 17 17" fill="none">
|
|
13
|
+
<Path
|
|
14
|
+
fillRule="evenodd"
|
|
15
|
+
clipRule="evenodd"
|
|
16
|
+
d="M16 .22a.75.75 0 010 1.06L1.28 16a.75.75 0 01-1.06-1.06L14.94.22a.75.75 0 011.06 0z"
|
|
17
|
+
fill={color}
|
|
18
|
+
/>
|
|
19
|
+
</Svg>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
|
|
4
|
+
export const SpringIcon = () => {
|
|
5
|
+
return (
|
|
6
|
+
<Svg width={89} height={28} viewBox="0 0 89 28" fill="none">
|
|
7
|
+
<Path
|
|
8
|
+
opacity={0.3}
|
|
9
|
+
d="M78.6 22.803c5.16-6.21 7.39-12.429 7.39-12.429s-9.147.354-13.334-3.964m4.843 8.342C40.345 31.653 33.237 6.535 44.312 2.88 55.388-.774 56.293 23.042 28.317 24.918 17.69 25.63 8.093 23.18 2.5 18.683"
|
|
10
|
+
stroke="#33334D"
|
|
11
|
+
strokeWidth={5}
|
|
12
|
+
strokeLinecap="round"
|
|
13
|
+
strokeLinejoin="round"
|
|
14
|
+
/>
|
|
15
|
+
</Svg>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
|
|
4
|
+
export const StarFillIcon = () => {
|
|
5
|
+
return (
|
|
6
|
+
<Svg width={10} height={11} viewBox="0 0 10 11" fill="none">
|
|
7
|
+
<Path
|
|
8
|
+
fillRule="evenodd"
|
|
9
|
+
clipRule="evenodd"
|
|
10
|
+
d="M5.767.432a.89.89 0 00-1.526 0L2.925 2.625l-2.25.563A.89.89 0 00.26 4.68l1.664 1.664-.553 2.626a.89.89 0 001.287.97l2.34-1.24 1.55.862.824.412a.89.89 0 001.269-.98l-.559-2.65L9.747 4.68a.89.89 0 00-.413-1.492l-2.251-.563L5.767.432z"
|
|
11
|
+
fill="#33334D"
|
|
12
|
+
fillOpacity={0.25}
|
|
13
|
+
/>
|
|
14
|
+
</Svg>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet, useWindowDimensions } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
ButtonVariant,
|
|
6
|
+
Typography,
|
|
7
|
+
HeadingVariants,
|
|
8
|
+
SPACING,
|
|
9
|
+
COLORS,
|
|
10
|
+
} from '@magmamath/react-native-ui'
|
|
11
|
+
import { useText } from '../../../i18n/i18n'
|
|
12
|
+
import { StartBanner } from './start-banner/StartBanner'
|
|
13
|
+
import { DayStreakCounter } from './day-streak-counter/DayStreakCounter'
|
|
14
|
+
import { SelectMathOperator } from './select-math-operator/SelectMathOperator'
|
|
15
|
+
import { FluencyMatrix } from './matrix/FluencyMatrix'
|
|
16
|
+
import type { FluencyModel } from '../model/FluencyModel'
|
|
17
|
+
import { FluencyProvider } from '../context/FluencyContext'
|
|
18
|
+
import type { FluencyMode } from '../fluency.constants'
|
|
19
|
+
import { isWeb } from '../../../shared/common.constants'
|
|
20
|
+
import { MenuIcon } from '../../../shared/icons/MenuIcon'
|
|
21
|
+
import { BURGER_MENU_BREAKPOINT } from '@magmamath/students-features'
|
|
22
|
+
|
|
23
|
+
type FluencyProps = {
|
|
24
|
+
model: FluencyModel
|
|
25
|
+
onMenuPress?: () => void
|
|
26
|
+
onStartPress?: () => void
|
|
27
|
+
onPracticePress?: () => void
|
|
28
|
+
onModeSelectPress?: (mode: FluencyMode) => void
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const Fluency = ({
|
|
32
|
+
model,
|
|
33
|
+
onMenuPress,
|
|
34
|
+
onStartPress,
|
|
35
|
+
onPracticePress,
|
|
36
|
+
onModeSelectPress,
|
|
37
|
+
}: FluencyProps) => {
|
|
38
|
+
const t = useText()
|
|
39
|
+
const dimensions = useWindowDimensions()
|
|
40
|
+
const withMenuButton = isWeb && dimensions.width <= BURGER_MENU_BREAKPOINT
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<FluencyProvider value={{ model, onStartPress, onPracticePress, onModeSelectPress }}>
|
|
44
|
+
<View style={styles.container}>
|
|
45
|
+
<View style={styles.titleRow}>
|
|
46
|
+
{withMenuButton && (
|
|
47
|
+
<View style={styles.burgerMenu}>
|
|
48
|
+
<Button
|
|
49
|
+
onPress={onMenuPress}
|
|
50
|
+
variant={ButtonVariant.TERTIARY}
|
|
51
|
+
icon={<MenuIcon size={24} />}
|
|
52
|
+
/>
|
|
53
|
+
</View>
|
|
54
|
+
)}
|
|
55
|
+
<Typography variant={HeadingVariants.H2} style={styles.title}>
|
|
56
|
+
{t('student.fluency.title')}
|
|
57
|
+
</Typography>
|
|
58
|
+
</View>
|
|
59
|
+
|
|
60
|
+
<View style={styles.header}>
|
|
61
|
+
<StartBanner />
|
|
62
|
+
<DayStreakCounter />
|
|
63
|
+
</View>
|
|
64
|
+
|
|
65
|
+
<View style={styles.matrixContainer}>
|
|
66
|
+
<View style={styles.operatorWrapper}>
|
|
67
|
+
<SelectMathOperator />
|
|
68
|
+
</View>
|
|
69
|
+
<FluencyMatrix />
|
|
70
|
+
</View>
|
|
71
|
+
</View>
|
|
72
|
+
</FluencyProvider>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
container: {},
|
|
78
|
+
titleRow: {
|
|
79
|
+
flexDirection: 'row',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
},
|
|
82
|
+
burgerMenu: {
|
|
83
|
+
marginRight: SPACING[200],
|
|
84
|
+
},
|
|
85
|
+
title: { color: COLORS.NEUTRAL_9 },
|
|
86
|
+
header: {
|
|
87
|
+
height: 182,
|
|
88
|
+
flexDirection: 'row',
|
|
89
|
+
marginTop: SPACING[400],
|
|
90
|
+
gap: SPACING[400],
|
|
91
|
+
zIndex: 1,
|
|
92
|
+
},
|
|
93
|
+
matrixContainer: {
|
|
94
|
+
flexDirection: 'row',
|
|
95
|
+
marginTop: SPACING[400],
|
|
96
|
+
gap: SPACING[200],
|
|
97
|
+
},
|
|
98
|
+
operatorWrapper: {
|
|
99
|
+
alignSelf: 'flex-start',
|
|
100
|
+
},
|
|
101
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
4
|
+
import type { FluencyModel } from '../model/FluencyModel'
|
|
5
|
+
import { FluencyProvider } from '../context/FluencyContext'
|
|
6
|
+
import { FluencySolvingHeader } from './fluency-solving/FluencySolvingHeader'
|
|
7
|
+
import { FluencySolvingProgress } from './fluency-solving/FluencySolvingProgress'
|
|
8
|
+
import { FluencySolvingCard } from './fluency-solving/FluencySolvingCard'
|
|
9
|
+
|
|
10
|
+
type FluencySolvingProps = {
|
|
11
|
+
model: FluencyModel
|
|
12
|
+
onClosePress?: () => void
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const FluencySolving = ({ model, onClosePress }: FluencySolvingProps) => {
|
|
16
|
+
return (
|
|
17
|
+
<FluencyProvider value={{ model }}>
|
|
18
|
+
<View style={styles.container}>
|
|
19
|
+
<FluencySolvingHeader onClosePress={onClosePress} />
|
|
20
|
+
<FluencySolvingProgress total={20} activeIndex={4} />
|
|
21
|
+
<FluencySolvingCard />
|
|
22
|
+
</View>
|
|
23
|
+
</FluencyProvider>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const styles = StyleSheet.create({
|
|
28
|
+
container: {
|
|
29
|
+
flex: 1,
|
|
30
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
31
|
+
},
|
|
32
|
+
})
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BORDER_RADIUS,
|
|
3
|
+
COLORS,
|
|
4
|
+
CorrectIcon,
|
|
5
|
+
HeadingVariants,
|
|
6
|
+
SPACING,
|
|
7
|
+
Typography,
|
|
8
|
+
} from '@magmamath/react-native-ui'
|
|
9
|
+
import React from 'react'
|
|
10
|
+
import { StyleSheet, TextStyle, View, ViewStyle } from 'react-native'
|
|
11
|
+
import type { FluencyModePreset } from '../../fluency.types'
|
|
12
|
+
|
|
13
|
+
const CIRCLE_SIZE = SPACING[800]
|
|
14
|
+
const CIRCLE_BORDER_RADIUS = BORDER_RADIUS[400]
|
|
15
|
+
|
|
16
|
+
type StreakStatus = 'missed' | 'gained' | 'today'
|
|
17
|
+
|
|
18
|
+
type StreakDayProps = {
|
|
19
|
+
label: string
|
|
20
|
+
status: StreakStatus
|
|
21
|
+
streakColor: FluencyModePreset['header']['streakColor']
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type StatusStyle = {
|
|
25
|
+
circle: ViewStyle
|
|
26
|
+
label: TextStyle
|
|
27
|
+
hasIcon: boolean
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const getStatusStyle = (
|
|
31
|
+
status: StreakStatus,
|
|
32
|
+
streakColor: FluencyModePreset['header']['streakColor']
|
|
33
|
+
): StatusStyle => {
|
|
34
|
+
if (status === 'gained') {
|
|
35
|
+
return {
|
|
36
|
+
circle: { backgroundColor: streakColor.gained, borderWidth: 1, borderColor: COLORS.NEUTRAL_3 },
|
|
37
|
+
label: { color: streakColor.gained },
|
|
38
|
+
hasIcon: true,
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (status === 'today') {
|
|
42
|
+
return {
|
|
43
|
+
circle: { backgroundColor: COLORS.NEUTRAL_2, borderWidth: 3, borderColor: streakColor.todayBorder },
|
|
44
|
+
label: { color: streakColor.todayBorder },
|
|
45
|
+
hasIcon: false,
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
circle: { backgroundColor: COLORS.NEUTRAL_2, borderWidth: 1, borderColor: COLORS.NEUTRAL_3 },
|
|
50
|
+
label: { color: COLORS.NEUTRAL_4 },
|
|
51
|
+
hasIcon: false,
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const StreakDay = ({ label, status, streakColor }: StreakDayProps) => {
|
|
56
|
+
const { circle, label: labelStyle, hasIcon } = getStatusStyle(status, streakColor)
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<View style={styles.container}>
|
|
60
|
+
<View style={[styles.circle, circle]}>
|
|
61
|
+
{hasIcon && <CorrectIcon color={COLORS.NEUTRAL_1} />}
|
|
62
|
+
</View>
|
|
63
|
+
<Typography variant={HeadingVariants.H3} style={labelStyle}>
|
|
64
|
+
{label}
|
|
65
|
+
</Typography>
|
|
66
|
+
</View>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const styles = StyleSheet.create({
|
|
71
|
+
container: {
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
gap: SPACING[100],
|
|
74
|
+
},
|
|
75
|
+
circle: {
|
|
76
|
+
width: CIRCLE_SIZE,
|
|
77
|
+
height: CIRCLE_SIZE,
|
|
78
|
+
borderRadius: CIRCLE_BORDER_RADIUS,
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
},
|
|
82
|
+
})
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, SHADOWS, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
+
import { StreakDay } from './DayStreak'
|
|
5
|
+
import { useFluencyModePreset } from '../../hooks/useFluencyModePreset'
|
|
6
|
+
import { useText } from '../../../../i18n/i18n'
|
|
7
|
+
|
|
8
|
+
export const DayStreakCounter = () => {
|
|
9
|
+
const t = useText()
|
|
10
|
+
const { header } = useFluencyModePreset()
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<View style={styles.container}>
|
|
14
|
+
<Typography style={styles.label}>{t('student.fluency.practiceThisWeek')}</Typography>
|
|
15
|
+
|
|
16
|
+
<View style={styles.streakDays}>
|
|
17
|
+
{/* TODO: Replace hardcoded days and statuses with real streak data from the model */}
|
|
18
|
+
<StreakDay
|
|
19
|
+
label={t('student.fluency.dayMonday')}
|
|
20
|
+
status="gained"
|
|
21
|
+
streakColor={header.streakColor}
|
|
22
|
+
/>
|
|
23
|
+
<StreakDay
|
|
24
|
+
label={t('student.fluency.dayTuesday')}
|
|
25
|
+
status="gained"
|
|
26
|
+
streakColor={header.streakColor}
|
|
27
|
+
/>
|
|
28
|
+
<StreakDay
|
|
29
|
+
label={t('student.fluency.dayWednesday')}
|
|
30
|
+
status="missed"
|
|
31
|
+
streakColor={header.streakColor}
|
|
32
|
+
/>
|
|
33
|
+
<StreakDay
|
|
34
|
+
label={t('student.fluency.dayThursday')}
|
|
35
|
+
status="today"
|
|
36
|
+
streakColor={header.streakColor}
|
|
37
|
+
/>
|
|
38
|
+
<StreakDay
|
|
39
|
+
label={t('student.fluency.dayFriday')}
|
|
40
|
+
status="gained"
|
|
41
|
+
streakColor={header.streakColor}
|
|
42
|
+
/>
|
|
43
|
+
</View>
|
|
44
|
+
</View>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const styles = StyleSheet.create({
|
|
49
|
+
container: {
|
|
50
|
+
height: '100%',
|
|
51
|
+
width: 230,
|
|
52
|
+
paddingVertical: SPACING[200],
|
|
53
|
+
paddingHorizontal: SPACING[400],
|
|
54
|
+
borderRadius: BORDER_RADIUS[300],
|
|
55
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
56
|
+
...SHADOWS[1],
|
|
57
|
+
},
|
|
58
|
+
label: {
|
|
59
|
+
fontSize: SPACING[300],
|
|
60
|
+
fontWeight: '700',
|
|
61
|
+
color: COLORS.NEUTRAL_8,
|
|
62
|
+
},
|
|
63
|
+
streakDays: {
|
|
64
|
+
flexDirection: 'row',
|
|
65
|
+
marginTop: 10,
|
|
66
|
+
gap: SPACING[200],
|
|
67
|
+
},
|
|
68
|
+
})
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React, { ComponentType } from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
BORDER_RADIUS,
|
|
5
|
+
COLORS,
|
|
6
|
+
FONT_FAMILY,
|
|
7
|
+
HeadingVariants,
|
|
8
|
+
SHADOWS,
|
|
9
|
+
SPACING,
|
|
10
|
+
Typography,
|
|
11
|
+
} from '@magmamath/react-native-ui'
|
|
12
|
+
|
|
13
|
+
type FluencyEquationCardProps = {
|
|
14
|
+
accentColor: string
|
|
15
|
+
OperatorIcon: ComponentType<{ color?: string; size?: number }>
|
|
16
|
+
input: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const FluencyEquationCard = ({
|
|
20
|
+
accentColor,
|
|
21
|
+
OperatorIcon,
|
|
22
|
+
input,
|
|
23
|
+
}: FluencyEquationCardProps) => {
|
|
24
|
+
const answerTextStyle = [styles.number, styles.answerText, { color: accentColor }]
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<View style={styles.stack}>
|
|
28
|
+
<View style={[styles.cardBase, styles.cardLayer2]} />
|
|
29
|
+
<View style={[styles.cardBase, styles.cardLayer1]} />
|
|
30
|
+
<View style={[styles.cardBase, styles.cardFront]}>
|
|
31
|
+
<Typography variant={HeadingVariants.H9} style={styles.cardLabel}>
|
|
32
|
+
Type your answer
|
|
33
|
+
</Typography>
|
|
34
|
+
|
|
35
|
+
<View style={styles.equationRow}>
|
|
36
|
+
<Typography style={styles.number}>6</Typography>
|
|
37
|
+
<OperatorIcon color={accentColor} size={36} />
|
|
38
|
+
<Typography style={styles.number}>6</Typography>
|
|
39
|
+
<Typography style={styles.equals}>=</Typography>
|
|
40
|
+
|
|
41
|
+
<View style={styles.answerBox}>
|
|
42
|
+
<Typography style={answerTextStyle}>{input}</Typography>
|
|
43
|
+
</View>
|
|
44
|
+
</View>
|
|
45
|
+
</View>
|
|
46
|
+
</View>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const CARD_HEIGHT = 260
|
|
51
|
+
|
|
52
|
+
const styles = StyleSheet.create({
|
|
53
|
+
stack: {
|
|
54
|
+
width: '100%',
|
|
55
|
+
maxWidth: 560,
|
|
56
|
+
},
|
|
57
|
+
cardBase: {
|
|
58
|
+
height: CARD_HEIGHT,
|
|
59
|
+
borderRadius: BORDER_RADIUS[400],
|
|
60
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
61
|
+
...SHADOWS[5],
|
|
62
|
+
},
|
|
63
|
+
cardLayer2: {
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
top: 24,
|
|
66
|
+
left: 40,
|
|
67
|
+
right: 40,
|
|
68
|
+
},
|
|
69
|
+
cardLayer1: {
|
|
70
|
+
position: 'absolute',
|
|
71
|
+
top: 12,
|
|
72
|
+
left: 20,
|
|
73
|
+
right: 20,
|
|
74
|
+
...SHADOWS[5],
|
|
75
|
+
},
|
|
76
|
+
cardFront: {
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
justifyContent: 'center',
|
|
79
|
+
},
|
|
80
|
+
cardLabel: {
|
|
81
|
+
fontSize: 11,
|
|
82
|
+
fontWeight: '700',
|
|
83
|
+
letterSpacing: 1.3,
|
|
84
|
+
marginBottom: SPACING[300],
|
|
85
|
+
color: COLORS.NEUTRAL_7,
|
|
86
|
+
},
|
|
87
|
+
equationRow: {
|
|
88
|
+
flexDirection: 'row',
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
gap: SPACING[300],
|
|
91
|
+
marginTop: SPACING[600],
|
|
92
|
+
},
|
|
93
|
+
number: {
|
|
94
|
+
fontSize: 60,
|
|
95
|
+
color: COLORS.NEUTRAL_10,
|
|
96
|
+
fontWeight: '700',
|
|
97
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
98
|
+
},
|
|
99
|
+
equals: {
|
|
100
|
+
fontSize: 60,
|
|
101
|
+
color: COLORS.NEUTRAL_7,
|
|
102
|
+
fontWeight: '700',
|
|
103
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
104
|
+
},
|
|
105
|
+
answerBox: {
|
|
106
|
+
width: 100,
|
|
107
|
+
height: 44,
|
|
108
|
+
alignItems: 'center',
|
|
109
|
+
borderBottomWidth: 8,
|
|
110
|
+
borderBottomColor: COLORS.NEUTRAL_10,
|
|
111
|
+
},
|
|
112
|
+
answerText: {
|
|
113
|
+
position: 'absolute',
|
|
114
|
+
},
|
|
115
|
+
})
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { useUnit } from 'effector-react'
|
|
4
|
+
import {
|
|
5
|
+
ButtonStates,
|
|
6
|
+
COLORS,
|
|
7
|
+
FONT_FAMILY,
|
|
8
|
+
SelectGroup,
|
|
9
|
+
SelectOptionColor,
|
|
10
|
+
SelectOptionSize,
|
|
11
|
+
SPACING,
|
|
12
|
+
} from '@magmamath/react-native-ui'
|
|
13
|
+
import { BackspaceIcon } from '../../../../shared/icons/keyboard/BackspaceIcon'
|
|
14
|
+
import { useFluency } from '../../context/FluencyContext'
|
|
15
|
+
import { useFluencyModePreset } from '../../hooks/useFluencyModePreset'
|
|
16
|
+
|
|
17
|
+
type NumpadKey = {
|
|
18
|
+
key: string
|
|
19
|
+
title: string | React.ReactNode
|
|
20
|
+
value: number | 'backspace' | 'enter'
|
|
21
|
+
customColorScheme?: typeof ACTION_KEY_COLOR_SCHEME
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const ACTION_KEY_COLOR_SCHEME = {
|
|
25
|
+
[ButtonStates.DEFAULT]: {
|
|
26
|
+
backgroundColor: COLORS.NEUTRAL_3,
|
|
27
|
+
borderColor: COLORS.NEUTRAL_5,
|
|
28
|
+
raiseColor: COLORS.NEUTRAL_5,
|
|
29
|
+
color: COLORS.NEUTRAL_9,
|
|
30
|
+
},
|
|
31
|
+
[ButtonStates.HOVER]: {
|
|
32
|
+
backgroundColor: COLORS.NEUTRAL_2,
|
|
33
|
+
borderColor: COLORS.NEUTRAL_4,
|
|
34
|
+
raiseColor: COLORS.NEUTRAL_4,
|
|
35
|
+
color: COLORS.NEUTRAL_9,
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const NUMPAD_KEYS: NumpadKey[] = [
|
|
40
|
+
{ key: '1', title: '1', value: 1 },
|
|
41
|
+
{ key: '2', title: '2', value: 2 },
|
|
42
|
+
{ key: '3', title: '3', value: 3 },
|
|
43
|
+
{ key: '4', title: '4', value: 4 },
|
|
44
|
+
{ key: '5', title: '5', value: 5 },
|
|
45
|
+
{ key: '6', title: '6', value: 6 },
|
|
46
|
+
{ key: '7', title: '7', value: 7 },
|
|
47
|
+
{ key: '8', title: '8', value: 8 },
|
|
48
|
+
{ key: '9', title: '9', value: 9 },
|
|
49
|
+
{
|
|
50
|
+
key: 'backspace',
|
|
51
|
+
title: <BackspaceIcon size={20} color={COLORS.NEUTRAL_9} />,
|
|
52
|
+
value: 'backspace',
|
|
53
|
+
customColorScheme: ACTION_KEY_COLOR_SCHEME,
|
|
54
|
+
},
|
|
55
|
+
{ key: '0', title: '0', value: 0 },
|
|
56
|
+
{ key: 'enter', title: 'Enter', value: 'enter', customColorScheme: ACTION_KEY_COLOR_SCHEME },
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
export const FluencyNumpad = () => {
|
|
60
|
+
const { model } = useFluency()
|
|
61
|
+
const { header, matrix } = useFluencyModePreset()
|
|
62
|
+
const input = useUnit(model.input.$state)
|
|
63
|
+
|
|
64
|
+
const accentColor = header.streakColor.todayBorder
|
|
65
|
+
const accentBorderColor = matrix.mastery.mastered
|
|
66
|
+
|
|
67
|
+
const enterAccentScheme = {
|
|
68
|
+
[ButtonStates.DEFAULT]: {
|
|
69
|
+
backgroundColor: accentColor,
|
|
70
|
+
borderColor: accentBorderColor,
|
|
71
|
+
raiseColor: accentBorderColor,
|
|
72
|
+
color: COLORS.NEUTRAL_1,
|
|
73
|
+
},
|
|
74
|
+
[ButtonStates.HOVER]: {
|
|
75
|
+
backgroundColor: accentColor,
|
|
76
|
+
borderColor: accentBorderColor,
|
|
77
|
+
raiseColor: accentBorderColor,
|
|
78
|
+
color: COLORS.NEUTRAL_1,
|
|
79
|
+
},
|
|
80
|
+
[ButtonStates.PRESSED]: {
|
|
81
|
+
backgroundColor: accentColor,
|
|
82
|
+
borderColor: accentBorderColor,
|
|
83
|
+
raiseColor: accentBorderColor,
|
|
84
|
+
color: COLORS.NEUTRAL_1,
|
|
85
|
+
},
|
|
86
|
+
[ButtonStates.ACTIVE]: {
|
|
87
|
+
backgroundColor: accentColor,
|
|
88
|
+
borderColor: accentBorderColor,
|
|
89
|
+
raiseColor: accentBorderColor,
|
|
90
|
+
color: COLORS.NEUTRAL_1,
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const options = NUMPAD_KEYS.map(({ value, customColorScheme, ...props }) => {
|
|
95
|
+
const isEnterKey = value === 'enter'
|
|
96
|
+
const colorScheme = isEnterKey && input ? enterAccentScheme : customColorScheme
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
...props,
|
|
100
|
+
customColorScheme: colorScheme,
|
|
101
|
+
onPressIn: () => {
|
|
102
|
+
if (value === 'backspace') return model.input.set({ erase: 'latest' })
|
|
103
|
+
if (value === 'enter') return model.input.submitFx()
|
|
104
|
+
model.input.set({ value })
|
|
105
|
+
},
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<View style={styles.container}>
|
|
111
|
+
<SelectGroup
|
|
112
|
+
numOfRows={4}
|
|
113
|
+
color={SelectOptionColor.GREY}
|
|
114
|
+
size={SelectOptionSize.SMALL}
|
|
115
|
+
options={options}
|
|
116
|
+
style={{
|
|
117
|
+
container: styles.grid,
|
|
118
|
+
row: styles.row,
|
|
119
|
+
option: {
|
|
120
|
+
button: styles.optionButton,
|
|
121
|
+
text: styles.optionText,
|
|
122
|
+
},
|
|
123
|
+
}}
|
|
124
|
+
/>
|
|
125
|
+
</View>
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const styles = StyleSheet.create({
|
|
130
|
+
container: {
|
|
131
|
+
alignItems: 'center',
|
|
132
|
+
paddingVertical: SPACING[400],
|
|
133
|
+
marginTop: SPACING[200],
|
|
134
|
+
},
|
|
135
|
+
grid: {
|
|
136
|
+
width: 360,
|
|
137
|
+
gap: SPACING[200],
|
|
138
|
+
},
|
|
139
|
+
row: {
|
|
140
|
+
gap: SPACING[200],
|
|
141
|
+
},
|
|
142
|
+
optionButton: {
|
|
143
|
+
height: 60,
|
|
144
|
+
},
|
|
145
|
+
optionText: {
|
|
146
|
+
fontSize: 24,
|
|
147
|
+
fontWeight: '700',
|
|
148
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
149
|
+
},
|
|
150
|
+
})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { useUnit } from 'effector-react'
|
|
4
|
+
import { FluencyNumpad } from './FluencyNumpad'
|
|
5
|
+
import { FluencyEquationCard } from './FluencyEquationCard'
|
|
6
|
+
import { SPACING } from '@magmamath/react-native-ui'
|
|
7
|
+
import { useFluencyModePreset } from '../../hooks/useFluencyModePreset'
|
|
8
|
+
import { useFluency } from '../../context/FluencyContext'
|
|
9
|
+
import { isWeb } from '../../../../shared/common.constants'
|
|
10
|
+
|
|
11
|
+
export const FluencySolvingCard = () => {
|
|
12
|
+
const { model } = useFluency()
|
|
13
|
+
const { header, icon: OperatorIcon } = useFluencyModePreset()
|
|
14
|
+
const accentColor = header.streakColor.todayBorder // TODO: add accentColor in mode preset.
|
|
15
|
+
const input = useUnit(model.input.$state)
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!isWeb) return
|
|
19
|
+
|
|
20
|
+
const handleKeyDown = (event: KeyboardEvent) => {
|
|
21
|
+
const isDigit = /^\d$/.test(event.key)
|
|
22
|
+
if (isDigit) return model.input.set({ value: Number(event.key) })
|
|
23
|
+
if (event.key === 'Backspace') return model.input.set({ erase: 'latest' })
|
|
24
|
+
if (event.key === 'Enter') return model.input.submitFx()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
window.addEventListener('keydown', handleKeyDown)
|
|
28
|
+
return () => window.removeEventListener('keydown', handleKeyDown)
|
|
29
|
+
}, [])
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<View>
|
|
33
|
+
<View style={styles.wrapper}>
|
|
34
|
+
<FluencyEquationCard accentColor={accentColor} OperatorIcon={OperatorIcon} input={input} />
|
|
35
|
+
</View>
|
|
36
|
+
|
|
37
|
+
<FluencyNumpad />
|
|
38
|
+
</View>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const styles = StyleSheet.create({
|
|
43
|
+
wrapper: {
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
paddingVertical: SPACING[400],
|
|
46
|
+
paddingHorizontal: SPACING[600],
|
|
47
|
+
marginTop: SPACING[300],
|
|
48
|
+
},
|
|
49
|
+
})
|