@magmamath/students-features 1.3.26-rc.4 → 1.3.26-rc.6
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/FlameIcon.js +30 -0
- package/dist/commonjs/features/fluency/assets/FlameIcon.js.map +1 -0
- package/dist/commonjs/features/fluency/assets/{SpringIcon.js → FlashIcon.js} +15 -14
- package/dist/commonjs/features/fluency/assets/FlashIcon.js.map +1 -0
- package/dist/commonjs/features/fluency/assets/SnurrisnurrBg.js +231 -0
- package/dist/commonjs/features/fluency/assets/SnurrisnurrBg.js.map +1 -0
- package/dist/commonjs/features/fluency/assets/StarFillIcon.js +5 -3
- package/dist/commonjs/features/fluency/assets/StarFillIcon.js.map +1 -1
- package/dist/commonjs/features/fluency/assets/TrophyBg.js +41 -0
- package/dist/commonjs/features/fluency/assets/TrophyBg.js.map +1 -0
- package/dist/commonjs/features/fluency/components/Fluency.js +2 -2
- package/dist/commonjs/features/fluency/components/Fluency.js.map +1 -1
- package/dist/commonjs/features/fluency/components/FluencySolving.js +15 -10
- package/dist/commonjs/features/fluency/components/FluencySolving.js.map +1 -1
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js +4 -4
- package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/EquationContent.js +54 -14
- package/dist/commonjs/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.js +8 -2
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyNumpad.js +2 -2
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyNumpad.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingCard.js +4 -33
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingCard.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js +13 -6
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js +5 -3
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.js +42 -14
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/fluencySolving.types.js +4 -0
- package/dist/commonjs/features/fluency/components/matrix/components/CellTooltip.js +56 -0
- package/dist/commonjs/features/fluency/components/matrix/components/CellTooltip.js.map +1 -0
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixCell.js +45 -29
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixCell.js.map +1 -1
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js +10 -4
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js.map +1 -1
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js +7 -1
- package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -1
- package/dist/commonjs/features/fluency/components/select-math-operator/ProgressBar.js +1 -57
- package/dist/commonjs/features/fluency/components/select-math-operator/ProgressBar.js.map +1 -1
- package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js +13 -5
- package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -1
- package/dist/commonjs/features/fluency/components/session-results/FluencySessionResults.js +144 -130
- package/dist/commonjs/features/fluency/components/session-results/FluencySessionResults.js.map +1 -1
- package/dist/commonjs/features/fluency/components/session-results/SessionStatCard.js +40 -62
- package/dist/commonjs/features/fluency/components/session-results/SessionStatCard.js.map +1 -1
- package/dist/commonjs/features/fluency/components/start-banner/BannerFlashcards.js +29 -29
- package/dist/commonjs/features/fluency/components/start-banner/BannerFlashcards.js.map +1 -1
- package/dist/commonjs/features/fluency/components/start-banner/MathFlashcard.js +1 -0
- package/dist/commonjs/features/fluency/components/start-banner/MathFlashcard.js.map +1 -1
- package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js +36 -9
- package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js.map +1 -1
- package/dist/commonjs/features/fluency/fluency.constants.js +16 -6
- package/dist/commonjs/features/fluency/fluency.constants.js.map +1 -1
- package/dist/commonjs/features/fluency/fluency.helpers.js +9 -8
- package/dist/commonjs/features/fluency/fluency.helpers.js.map +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js.map +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencyNumpad.js +59 -73
- package/dist/commonjs/features/fluency/hooks/useFluencyNumpad.js.map +1 -1
- package/dist/commonjs/features/fluency/hooks/useFluencySolvingPreset.js +57 -0
- package/dist/commonjs/features/fluency/hooks/useFluencySolvingPreset.js.map +1 -0
- package/dist/commonjs/features/fluency/hooks/usePreventWebKeys.js +26 -0
- package/dist/commonjs/features/fluency/hooks/usePreventWebKeys.js.map +1 -0
- package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js +0 -1
- package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js.map +1 -1
- package/dist/commonjs/features/fluency/model/FluencyModel.js +31 -1
- package/dist/commonjs/features/fluency/model/FluencyModel.js.map +1 -1
- package/dist/commonjs/features/fluency/model/FluencySolvingModel.js +129 -46
- package/dist/commonjs/features/fluency/model/FluencySolvingModel.js.map +1 -1
- package/dist/module/features/fluency/assets/FlameIcon.js +22 -0
- package/dist/module/features/fluency/assets/FlameIcon.js.map +1 -0
- package/dist/module/features/fluency/assets/FlashIcon.js +22 -0
- package/dist/module/features/fluency/assets/FlashIcon.js.map +1 -0
- package/dist/module/features/fluency/assets/SnurrisnurrBg.js +224 -0
- package/dist/module/features/fluency/assets/SnurrisnurrBg.js.map +1 -0
- package/dist/module/features/fluency/assets/StarFillIcon.js +5 -3
- package/dist/module/features/fluency/assets/StarFillIcon.js.map +1 -1
- package/dist/module/features/fluency/assets/TrophyBg.js +33 -0
- package/dist/module/features/fluency/assets/TrophyBg.js.map +1 -0
- package/dist/module/features/fluency/components/Fluency.js +2 -2
- package/dist/module/features/fluency/components/Fluency.js.map +1 -1
- package/dist/module/features/fluency/components/FluencySolving.js +14 -10
- package/dist/module/features/fluency/components/FluencySolving.js.map +1 -1
- package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js +4 -4
- package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/EquationContent.js +53 -14
- package/dist/module/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.js +8 -2
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyNumpad.js +2 -2
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyNumpad.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.js +3 -31
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js +14 -7
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js +5 -3
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.helpers.js +38 -14
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.helpers.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/fluencySolving.types.js +2 -0
- package/dist/module/features/fluency/components/matrix/components/CellTooltip.js +50 -0
- package/dist/module/features/fluency/components/matrix/components/CellTooltip.js.map +1 -0
- package/dist/module/features/fluency/components/matrix/components/MatrixCell.js +45 -30
- package/dist/module/features/fluency/components/matrix/components/MatrixCell.js.map +1 -1
- package/dist/module/features/fluency/components/matrix/components/MatrixFill.js +10 -4
- package/dist/module/features/fluency/components/matrix/components/MatrixFill.js.map +1 -1
- package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js +7 -1
- package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -1
- package/dist/module/features/fluency/components/select-math-operator/ProgressBar.js +1 -57
- package/dist/module/features/fluency/components/select-math-operator/ProgressBar.js.map +1 -1
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js +14 -6
- package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -1
- package/dist/module/features/fluency/components/session-results/FluencySessionResults.js +145 -132
- package/dist/module/features/fluency/components/session-results/FluencySessionResults.js.map +1 -1
- package/dist/module/features/fluency/components/session-results/SessionStatCard.js +42 -64
- package/dist/module/features/fluency/components/session-results/SessionStatCard.js.map +1 -1
- package/dist/module/features/fluency/components/start-banner/BannerFlashcards.js +29 -29
- package/dist/module/features/fluency/components/start-banner/BannerFlashcards.js.map +1 -1
- package/dist/module/features/fluency/components/start-banner/MathFlashcard.js +2 -1
- package/dist/module/features/fluency/components/start-banner/MathFlashcard.js.map +1 -1
- package/dist/module/features/fluency/components/start-banner/StartBanner.js +38 -11
- package/dist/module/features/fluency/components/start-banner/StartBanner.js.map +1 -1
- package/dist/module/features/fluency/fluency.constants.js +15 -6
- package/dist/module/features/fluency/fluency.constants.js.map +1 -1
- package/dist/module/features/fluency/fluency.helpers.js +9 -8
- package/dist/module/features/fluency/fluency.helpers.js.map +1 -1
- package/dist/module/features/fluency/hooks/useFluencyModePreset.js +1 -1
- package/dist/module/features/fluency/hooks/useFluencyModePreset.js.map +1 -1
- package/dist/module/features/fluency/hooks/useFluencyNumpad.js +61 -74
- package/dist/module/features/fluency/hooks/useFluencyNumpad.js.map +1 -1
- package/dist/module/features/fluency/hooks/useFluencySolvingPreset.js +52 -0
- package/dist/module/features/fluency/hooks/useFluencySolvingPreset.js.map +1 -0
- package/dist/module/features/fluency/hooks/usePreventWebKeys.js +21 -0
- package/dist/module/features/fluency/hooks/usePreventWebKeys.js.map +1 -0
- package/dist/module/features/fluency/model/FluencyMatrixModel.js +0 -1
- package/dist/module/features/fluency/model/FluencyMatrixModel.js.map +1 -1
- package/dist/module/features/fluency/model/FluencyModel.js +32 -2
- package/dist/module/features/fluency/model/FluencyModel.js.map +1 -1
- package/dist/module/features/fluency/model/FluencySolvingModel.js +131 -48
- package/dist/module/features/fluency/model/FluencySolvingModel.js.map +1 -1
- package/dist/typescript/commonjs/features/fluency/assets/FlameIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/fluency/assets/FlameIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/assets/FlashIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/fluency/assets/FlashIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/assets/SnurrisnurrBg.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/assets/SnurrisnurrBg.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/assets/StarFillIcon.d.ts +5 -1
- package/dist/typescript/commonjs/features/fluency/assets/StarFillIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/assets/TrophyBg.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/assets/TrophyBg.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts +3 -2
- package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/FluencySolving.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/EquationContent.d.ts +4 -2
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyNumpad.d.ts +2 -2
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyNumpad.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts +3 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.types.d.ts +11 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/fluencySolving.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/CellTooltip.d.ts +7 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/CellTooltip.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts +4 -2
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixLegend.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/select-math-operator/ProgressBar.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/session-results/FluencySessionResults.d.ts +3 -5
- package/dist/typescript/commonjs/features/fluency/components/session-results/FluencySessionResults.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/session-results/SessionStatCard.d.ts +5 -4
- package/dist/typescript/commonjs/features/fluency/components/session-results/SessionStatCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts +9 -0
- package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts +2 -5
- package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts +21 -12
- package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts +1 -5
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyNumpad.d.ts +14 -14
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencyNumpad.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencySolvingPreset.d.ts +22 -0
- package/dist/typescript/commonjs/features/fluency/hooks/useFluencySolvingPreset.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/hooks/usePreventWebKeys.d.ts +9 -0
- package/dist/typescript/commonjs/features/fluency/hooks/usePreventWebKeys.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts +0 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts +2 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts +18 -12
- package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/assets/FlameIcon.d.ts +4 -0
- package/dist/typescript/module/features/fluency/assets/FlameIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/assets/FlashIcon.d.ts +4 -0
- package/dist/typescript/module/features/fluency/assets/FlashIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/assets/SnurrisnurrBg.d.ts +3 -0
- package/dist/typescript/module/features/fluency/assets/SnurrisnurrBg.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/assets/StarFillIcon.d.ts +5 -1
- package/dist/typescript/module/features/fluency/assets/StarFillIcon.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/assets/TrophyBg.d.ts +3 -0
- package/dist/typescript/module/features/fluency/assets/TrophyBg.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/Fluency.d.ts +3 -2
- package/dist/typescript/module/features/fluency/components/Fluency.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/FluencySolving.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/EquationContent.d.ts +4 -2
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyNumpad.d.ts +2 -2
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyNumpad.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencySolvingCard.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts +3 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.types.d.ts +11 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/fluencySolving.types.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/matrix/components/CellTooltip.d.ts +7 -0
- package/dist/typescript/module/features/fluency/components/matrix/components/CellTooltip.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts +4 -2
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/matrix/components/MatrixLegend.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/select-math-operator/ProgressBar.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/session-results/FluencySessionResults.d.ts +3 -5
- package/dist/typescript/module/features/fluency/components/session-results/FluencySessionResults.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/session-results/SessionStatCard.d.ts +5 -4
- package/dist/typescript/module/features/fluency/components/session-results/SessionStatCard.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/fluency.constants.d.ts +9 -0
- package/dist/typescript/module/features/fluency/fluency.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/fluency.helpers.d.ts +2 -5
- package/dist/typescript/module/features/fluency/fluency.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/fluency.types.d.ts +21 -12
- package/dist/typescript/module/features/fluency/fluency.types.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts +1 -5
- package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/hooks/useFluencyNumpad.d.ts +14 -14
- package/dist/typescript/module/features/fluency/hooks/useFluencyNumpad.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/hooks/useFluencySolvingPreset.d.ts +22 -0
- package/dist/typescript/module/features/fluency/hooks/useFluencySolvingPreset.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/hooks/usePreventWebKeys.d.ts +9 -0
- package/dist/typescript/module/features/fluency/hooks/usePreventWebKeys.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts +0 -1
- package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts +2 -1
- package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts +18 -12
- package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts.map +1 -1
- package/package.json +3 -1
- package/src/features/fluency/assets/FlameIcon.tsx +14 -0
- package/src/features/fluency/assets/FlashIcon.tsx +14 -0
- package/src/features/fluency/assets/SnurrisnurrBg.tsx +193 -0
- package/src/features/fluency/assets/StarFillIcon.tsx +7 -3
- package/src/features/fluency/assets/TrophyBg.tsx +32 -0
- package/src/features/fluency/components/Fluency.tsx +4 -3
- package/src/features/fluency/components/FluencySolving.tsx +15 -9
- package/src/features/fluency/components/day-streak-counter/DayStreakCounter.tsx +6 -6
- package/src/features/fluency/components/fluency-solving/components/EquationContent.tsx +51 -13
- package/src/features/fluency/components/fluency-solving/components/FluencyEquationCard.tsx +12 -2
- package/src/features/fluency/components/fluency-solving/components/FluencyNumpad.tsx +3 -3
- package/src/features/fluency/components/fluency-solving/components/FluencySolvingCard.tsx +3 -36
- package/src/features/fluency/components/fluency-solving/components/FluencySolvingHeader.tsx +13 -4
- package/src/features/fluency/components/fluency-solving/components/FluencySolvingProgress.tsx +8 -4
- package/src/features/fluency/components/fluency-solving/fluencySolving.helpers.ts +40 -16
- package/src/features/fluency/components/fluency-solving/fluencySolving.types.ts +12 -1
- package/src/features/fluency/components/matrix/components/CellTooltip.tsx +46 -0
- package/src/features/fluency/components/matrix/components/MatrixCell.tsx +47 -28
- package/src/features/fluency/components/matrix/components/MatrixFill.tsx +16 -3
- package/src/features/fluency/components/matrix/components/MatrixLegend.tsx +7 -2
- package/src/features/fluency/components/select-math-operator/ProgressBar.tsx +1 -66
- package/src/features/fluency/components/select-math-operator/SelectMathOperator.tsx +25 -5
- package/src/features/fluency/components/session-results/FluencySessionResults.tsx +127 -147
- package/src/features/fluency/components/session-results/SessionStatCard.tsx +35 -77
- package/src/features/fluency/components/start-banner/BannerFlashcards.tsx +15 -15
- package/src/features/fluency/components/start-banner/MathFlashcard.tsx +2 -1
- package/src/features/fluency/components/start-banner/StartBanner.tsx +38 -10
- package/src/features/fluency/fluency.constants.ts +15 -6
- package/src/features/fluency/fluency.helpers.ts +11 -10
- package/src/features/fluency/fluency.types.ts +28 -7
- package/src/features/fluency/hooks/useFluencyModePreset.ts +2 -3
- package/src/features/fluency/hooks/useFluencyNumpad.tsx +61 -80
- package/src/features/fluency/hooks/useFluencySolvingPreset.ts +49 -0
- package/src/features/fluency/hooks/usePreventWebKeys.ts +24 -0
- package/src/features/fluency/model/FluencyMatrixModel.ts +1 -1
- package/src/features/fluency/model/FluencyModel.ts +35 -3
- package/src/features/fluency/model/FluencySolvingModel.ts +170 -57
- package/dist/commonjs/features/fluency/assets/SpringIcon.js.map +0 -1
- package/dist/module/features/fluency/assets/SpringIcon.js +0 -22
- package/dist/module/features/fluency/assets/SpringIcon.js.map +0 -1
- package/dist/typescript/commonjs/features/fluency/assets/SpringIcon.d.ts +0 -3
- package/dist/typescript/commonjs/features/fluency/assets/SpringIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency/assets/SpringIcon.d.ts +0 -3
- package/dist/typescript/module/features/fluency/assets/SpringIcon.d.ts.map +0 -1
- package/src/features/fluency/assets/SpringIcon.tsx +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","BORDER_RADIUS","Button","ButtonSize","ButtonVariant","COLORS","HeadingVariants","SHADOWS","SPACING","Typography","
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","BORDER_RADIUS","Button","ButtonColor","ButtonSize","ButtonVariant","COLORS","HeadingVariants","SHADOWS","SPACING","Typography","useFluencySolvingPreset","XCloseIcon","jsx","_jsx","jsxs","_jsxs","FluencySolvingHeader","onClosePress","modePreset","style","styles","container","children","variant","SECONDARY","size","LARGE","colorScheme","WHITE","icon","onPress","operatorBadge","backgroundColor","colors","accent","H7","symbol","H4","title","label","create","height","flexDirection","alignItems","gap","paddingVertical","paddingHorizontal","width","borderRadius","justifyContent","color","NEUTRAL_10","fontWeight","fontSize","marginBottom","NEUTRAL_1"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/fluency-solving/components/FluencySolvingHeader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SACEC,aAAa,EACbC,MAAM,EACNC,WAAW,EACXC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,eAAe,EACfC,OAAO,EACPC,OAAO,EACPC,UAAU,QACL,4BAA4B;AACnC,SAASC,uBAAuB,QAAQ,2CAAwC;AAChF,SAASC,UAAU,QAAQ,2CAAwC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMnE,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EAAEC;AAAwC,CAAC,KAAK;EACnF,MAAMC,UAAU,GAAGR,uBAAuB,CAAC,CAAC;EAE5C,oBACEK,KAAA,CAACjB,IAAI;IAACqB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5BT,IAAA,CAACZ,MAAM;MACLsB,OAAO,EAAEnB,a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+B,KAAK,EAAE;IACLY,KAAK,EAAE7C,MAAM,CAAC8C,UAAU;IACxBC,UAAU,EAAE;EACd,CAAC;EACDhB,MAAM,EAAE;IACNiB,QAAQ,EAAE,EAAE;IACZD,UAAU,EAAE,KAAK;IACjBE,YAAY,EAAE,CAAC;IACfJ,KAAK,EAAE7C,MAAM,CAACkD;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View, StyleSheet } from 'react-native';
|
|
5
5
|
import { COLORS, SPACING } from '@magmamath/react-native-ui';
|
|
6
|
+
import { AttemptStatus } from "../../../fluency.constants.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
export const FluencySolvingProgress = ({
|
|
8
9
|
total,
|
|
@@ -20,7 +21,7 @@ export const FluencySolvingProgress = ({
|
|
|
20
21
|
if (index < activeIndex) {
|
|
21
22
|
const outcome = outcomes[index];
|
|
22
23
|
return /*#__PURE__*/_jsx(View, {
|
|
23
|
-
style: outcome ? DOT_STYLE_BY_OUTCOME[outcome] : styles.dot
|
|
24
|
+
style: outcome ? DOT_STYLE_BY_OUTCOME[outcome.status] : styles.dot
|
|
24
25
|
}, index);
|
|
25
26
|
}
|
|
26
27
|
return /*#__PURE__*/_jsx(View, {
|
|
@@ -63,7 +64,8 @@ const styles = StyleSheet.create({
|
|
|
63
64
|
}
|
|
64
65
|
});
|
|
65
66
|
const DOT_STYLE_BY_OUTCOME = {
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
[AttemptStatus.CORRECT]: styles.dotCorrect,
|
|
68
|
+
[AttemptStatus.INCORRECT]: styles.dotWrong,
|
|
69
|
+
[AttemptStatus.SKIPPED]: styles.dot
|
|
68
70
|
};
|
|
69
71
|
//# sourceMappingURL=FluencySolvingProgress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","COLORS","SPACING","jsx","_jsx","FluencySolvingProgress","total","activeIndex","outcomes","style","styles","container","children","Array","from","length","map","_","index","dotActive","outcome","DOT_STYLE_BY_OUTCOME","dot","create","flexDirection","gap","paddingHorizontal","paddingVertical","justifyContent","width","height","borderRadius","backgroundColor","NEUTRAL_4","NEUTRAL_10","dotCorrect","PRIMARY_GREEN","dotWrong","PRIMARY_RED","
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","COLORS","SPACING","AttemptStatus","jsx","_jsx","FluencySolvingProgress","total","activeIndex","outcomes","style","styles","container","children","Array","from","length","map","_","index","dotActive","outcome","DOT_STYLE_BY_OUTCOME","status","dot","create","flexDirection","gap","paddingHorizontal","paddingVertical","justifyContent","width","height","borderRadius","backgroundColor","NEUTRAL_4","NEUTRAL_10","dotCorrect","PRIMARY_GREEN","dotWrong","PRIMARY_RED","CORRECT","INCORRECT","SKIPPED"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/fluency-solving/components/FluencySolvingProgress.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AAC5D,SAASC,aAAa,QAAQ,+BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAS1D,OAAO,MAAMC,sBAAsB,GAAGA,CAAC;EACrCC,KAAK;EACLC,WAAW;EACXC;AAC2B,CAAC,KAAK;EACjC,oBACEJ,IAAA,CAACN,IAAI;IAACW,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,EAC3BC,KAAK,CAACC,IAAI,CAAC;MAAEC,MAAM,EAAET;IAAM,CAAC,CAAC,CAACU,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,KAAK;MAC/C,IAAIA,KAAK,KAAKX,WAAW,EAAE,oBAAOH,IAAA,CAACN,IAAI;QAAaW,KAAK,EA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C,CAAC;AAEF,MAAMlB,oBAAmD,GAAG;EAC1D,CAACnB,aAAa,CAACsC,OAAO,GAAG9B,MAAM,CAAC0B,UAAU;EAC1C,CAAClC,aAAa,CAACuC,SAAS,GAAG/B,MAAM,CAAC4B,QAAQ;EAC1C,CAACpC,aAAa,CAACwC,OAAO,GAAGhC,MAAM,CAACa;AAClC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { AttemptStatus } from "../../fluency.constants.js";
|
|
3
4
|
import { DEFAULT_PICKER_PARAMS, MODE_ANSWER_EVAL_FORMULA } from "./fluencySolving.constants.js";
|
|
4
5
|
export function toSolvingFacts(factMap, mode) {
|
|
5
6
|
return Object.entries(factMap).map(([id, fact]) => {
|
|
@@ -8,35 +9,58 @@ export function toSolvingFacts(factMap, mode) {
|
|
|
8
9
|
const box = fact.box ?? 0;
|
|
9
10
|
return {
|
|
10
11
|
id,
|
|
12
|
+
mode,
|
|
11
13
|
numbers: fact.numbers,
|
|
12
14
|
answer,
|
|
13
15
|
difficulty: fact.difficulty,
|
|
14
16
|
box,
|
|
15
17
|
lastSeenMs: fact.lastAttemptedAt ? new Date(fact.lastAttemptedAt).getTime() : null,
|
|
16
18
|
sessionStartBox: box,
|
|
17
|
-
hasFailedThisSession: false
|
|
19
|
+
hasFailedThisSession: false,
|
|
20
|
+
attemptsCount: fact.attemptsCount,
|
|
21
|
+
correctCount: fact.correctCount
|
|
18
22
|
};
|
|
19
23
|
});
|
|
20
24
|
}
|
|
21
|
-
function
|
|
22
|
-
const interval =
|
|
23
|
-
const overdueness = fact.lastSeenMs === null ? 1 : Math.
|
|
24
|
-
const weakness =
|
|
25
|
-
const ease =
|
|
26
|
-
|
|
27
|
-
return params.wDue * overdueness + params.wWeak * weakness + params.wEase * (ease * weakness) + params.wRand * rand;
|
|
25
|
+
function computePriority(fact, now, params, maxDifficulty) {
|
|
26
|
+
const interval = Math.max(0.001, params.boxIntervals[Math.max(1, fact.box)]);
|
|
27
|
+
const overdueness = fact.lastSeenMs === null ? 1.0 : Math.min(1, (now - fact.lastSeenMs) / (2 * interval));
|
|
28
|
+
const weakness = (params.numBoxes - fact.box) / params.numBoxes;
|
|
29
|
+
const ease = (1 - fact.difficulty / Math.max(0.1, maxDifficulty)) * weakness;
|
|
30
|
+
return params.wDue * overdueness + params.wWeak * weakness + params.wEase * ease + params.wRand * Math.random();
|
|
28
31
|
}
|
|
29
32
|
export function selectNextFact(facts, now, params = DEFAULT_PICKER_PARAMS) {
|
|
30
33
|
if (facts.length === 0) return null;
|
|
31
34
|
const available = facts.filter(f => f.box < params.numBoxes);
|
|
32
35
|
const pool = available.length > 0 ? available : facts;
|
|
33
|
-
const maxDifficulty =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
const maxDifficulty = pool.reduce((m, f) => Math.max(m, f.difficulty), 1);
|
|
37
|
+
let best = pool[0];
|
|
38
|
+
let bestScore = -Infinity;
|
|
39
|
+
for (const f of pool) {
|
|
40
|
+
const score = computePriority(f, now, params, maxDifficulty);
|
|
41
|
+
if (score > bestScore) {
|
|
42
|
+
bestScore = score;
|
|
43
|
+
best = f;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return best;
|
|
39
47
|
}
|
|
48
|
+
export const formatSessionDuration = ms => {
|
|
49
|
+
const totalSeconds = Math.floor(ms / 1000);
|
|
50
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
51
|
+
const seconds = totalSeconds % 60;
|
|
52
|
+
return `${minutes}:${seconds.toString().padStart(2, '0')}`;
|
|
53
|
+
};
|
|
54
|
+
export const calculateMaxStreak = outcomes => outcomes.reduce((acc, outcome) => {
|
|
55
|
+
const current = outcome.status === AttemptStatus.CORRECT ? acc.current + 1 : 0;
|
|
56
|
+
return {
|
|
57
|
+
max: Math.max(acc.max, current),
|
|
58
|
+
current
|
|
59
|
+
};
|
|
60
|
+
}, {
|
|
61
|
+
max: 0,
|
|
62
|
+
current: 0
|
|
63
|
+
}).max;
|
|
40
64
|
export function calculateNextBox({
|
|
41
65
|
currentBox,
|
|
42
66
|
isCorrect,
|
package/dist/module/features/fluency/components/fluency-solving/fluencySolving.helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_PICKER_PARAMS","MODE_ANSWER_EVAL_FORMULA","toSolvingFacts","factMap","mode","Object","entries","map","id","fact","a","b","numbers","answer","box","difficulty","lastSeenMs","lastAttemptedAt","Date","getTime","sessionStartBox","hasFailedThisSession","
|
|
1
|
+
{"version":3,"names":["AttemptStatus","DEFAULT_PICKER_PARAMS","MODE_ANSWER_EVAL_FORMULA","toSolvingFacts","factMap","mode","Object","entries","map","id","fact","a","b","numbers","answer","box","difficulty","lastSeenMs","lastAttemptedAt","Date","getTime","sessionStartBox","hasFailedThisSession","attemptsCount","correctCount","computePriority","now","params","maxDifficulty","interval","Math","max","boxIntervals","overdueness","min","weakness","numBoxes","ease","wDue","wWeak","wEase","wRand","random","selectNextFact","facts","length","available","filter","f","pool","reduce","m","best","bestScore","Infinity","score","formatSessionDuration","ms","totalSeconds","floor","minutes","seconds","toString","padStart","calculateMaxStreak","outcomes","acc","outcome","current","status","CORRECT","calculateNextBox","currentBox","isCorrect","isFast"],"sourceRoot":"../../../../../../src","sources":["features/fluency/components/fluency-solving/fluencySolving.helpers.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAqB,4BAAyB;AAEpE,SAASC,qBAAqB,EAAEC,wBAAwB,QAAQ,+BAA4B;AAG5F,OAAO,SAASC,cAAcA,CAACC,OAA6B,EAAEC,IAAiB,EAAiB;EAC9F,OAAOC,MAAM,CAACC,OAAO,CAACH,OAAO,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,EAAE,EAAEC,IAAI,CAAC,KAAK;IACjD,MAAM,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAGF,IAAI,CAACG,OAAO;I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+
import { BORDER_RADIUS, COLORS, SHADOWS, SPACING } from '@magmamath/react-native-ui';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export const CellTooltip = ({
|
|
8
|
+
label
|
|
9
|
+
}) => /*#__PURE__*/_jsxs(View, {
|
|
10
|
+
style: styles.container,
|
|
11
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
12
|
+
style: styles.bubble,
|
|
13
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
14
|
+
style: styles.label,
|
|
15
|
+
children: label
|
|
16
|
+
})
|
|
17
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
18
|
+
style: styles.arrow
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
const styles = StyleSheet.create({
|
|
22
|
+
container: {
|
|
23
|
+
alignItems: 'center'
|
|
24
|
+
},
|
|
25
|
+
bubble: {
|
|
26
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
27
|
+
borderRadius: BORDER_RADIUS[150],
|
|
28
|
+
paddingHorizontal: SPACING[200],
|
|
29
|
+
paddingVertical: SPACING[100],
|
|
30
|
+
...SHADOWS[4]
|
|
31
|
+
},
|
|
32
|
+
label: {
|
|
33
|
+
fontSize: 13,
|
|
34
|
+
lineHeight: 16,
|
|
35
|
+
color: COLORS.NEUTRAL_9,
|
|
36
|
+
textAlign: 'center'
|
|
37
|
+
},
|
|
38
|
+
arrow: {
|
|
39
|
+
width: 0,
|
|
40
|
+
height: 0,
|
|
41
|
+
borderLeftWidth: 9,
|
|
42
|
+
borderRightWidth: 9,
|
|
43
|
+
borderTopWidth: 12,
|
|
44
|
+
borderStyle: 'solid',
|
|
45
|
+
borderLeftColor: 'transparent',
|
|
46
|
+
borderRightColor: 'transparent',
|
|
47
|
+
borderTopColor: COLORS.NEUTRAL_1
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=CellTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","BORDER_RADIUS","COLORS","SHADOWS","SPACING","jsx","_jsx","jsxs","_jsxs","CellTooltip","label","style","styles","container","children","bubble","arrow","create","alignItems","backgroundColor","NEUTRAL_1","borderRadius","paddingHorizontal","paddingVertical","fontSize","lineHeight","color","NEUTRAL_9","textAlign","width","height","borderLeftWidth","borderRightWidth","borderTopWidth","borderStyle","borderLeftColor","borderRightColor","borderTopColor"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/matrix/components/CellTooltip.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SAASC,aAAa,EAAEC,MAAM,EAAEC,OAAO,EAAEC,OAAO,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMpF,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAAEC;AAAwB,CAAC,kBACrDF,KAAA,CAACV,IAAI;EAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAAC,QAAA,gBAC5BR,IAAA,CAACR,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACG,MAAO;IAAAD,QAAA,eACzBR,IAAA,CAACP,IAAI;MAACY,KAAK,EAAEC,MAAM,CAACF,KAAM;MAAAI,QAAA,EAAEJ;IAAK,CAAO;EAAC,CACrC,CAAC,eACPJ,IAAA,CAACR,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACI;EAAM,CAAE,CAAC;AAAA,CACzB,CACP;AAED,MAAMJ,MAAM,GAAGZ,UAAU,CAACiB,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,UAAU,EAAE;EACd,CAAC;EACDH,MAAM,EAAE;IACNI,eAAe,EAAEjB,MAAM,CAACkB,SAAS;IACjCC,YAAY,EAAEpB,aAAa,CAAC,GAAG,CAAC;IAChCqB,iBAAiB,EAAElB,OAAO,CAAC,GAAG,CAAC;IAC/BmB,eAAe,EAAEnB,OAAO,CAAC,GAAG,CAAC;IAC7B,GAAGD,OAAO,CAAC,CAAC;EACd,CAAC;EACDO,KAAK,EAAE;IACLc,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAExB,MAAM,CAACyB,SAAS;IACvBC,SAAS,EAAE;EACb,CAAC;EACDZ,KAAK,EAAE;IACLa,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,eAAe,EAAE,CAAC;IAClBC,gBAAgB,EAAE,CAAC;IACnBC,cAAc,EAAE,EAAE;IAClBC,WAAW,EAAE,OAAO;IACpBC,eAAe,EAAE,aAAa;IAC9BC,gBAAgB,EAAE,aAAa;IAC/BC,cAAc,EAAEnC,MAAM,CAACkB;EACzB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { View, Text, StyleSheet } from 'react-native';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { Pressable, View, Text, StyleSheet } from 'react-native';
|
|
5
5
|
import { BORDER_RADIUS, COLORS, SPACING } from '@magmamath/react-native-ui';
|
|
6
6
|
import { getMasteryLevelByBox } from "../../../fluency.helpers.js";
|
|
7
7
|
import { FluencyMasteryLevel } from "../../../fluency.constants.js";
|
|
8
8
|
import { StarFillIcon } from "../../../assets/StarFillIcon.js";
|
|
9
|
-
import {
|
|
9
|
+
import { CellTooltip } from "./CellTooltip.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
11
|
export const MatrixCell = ({
|
|
11
12
|
label,
|
|
12
13
|
box,
|
|
13
14
|
isHeader,
|
|
14
15
|
levelColors,
|
|
15
|
-
|
|
16
|
+
tooltipLabel
|
|
16
17
|
}) => {
|
|
18
|
+
const [isActive, setIsActive] = useState(false);
|
|
17
19
|
const masteryLevel = box ? getMasteryLevelByBox(box) : null;
|
|
18
20
|
const isMastered = masteryLevel === FluencyMasteryLevel.MASTERED;
|
|
19
21
|
const bgColor = (() => {
|
|
@@ -21,50 +23,63 @@ export const MatrixCell = ({
|
|
|
21
23
|
if (isHeader) return COLORS.NEUTRAL_5;
|
|
22
24
|
return COLORS.NEUTRAL_2;
|
|
23
25
|
})();
|
|
26
|
+
const showTooltip = isActive && !!tooltipLabel;
|
|
27
|
+
const activate = () => setIsActive(true);
|
|
28
|
+
const deactivate = () => setIsActive(false);
|
|
24
29
|
return /*#__PURE__*/_jsxs(View, {
|
|
25
|
-
style: [styles.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
style: styles.divisorText,
|
|
32
|
-
children: ["\xF7", divisor]
|
|
30
|
+
style: [styles.wrapper, showTooltip && styles.wrapperActive],
|
|
31
|
+
children: [showTooltip && /*#__PURE__*/_jsx(View, {
|
|
32
|
+
style: styles.tooltipContainer,
|
|
33
|
+
pointerEvents: "none",
|
|
34
|
+
children: /*#__PURE__*/_jsx(CellTooltip, {
|
|
35
|
+
label: tooltipLabel
|
|
33
36
|
})
|
|
34
|
-
})
|
|
35
|
-
style:
|
|
36
|
-
|
|
37
|
+
}), /*#__PURE__*/_jsxs(Pressable, {
|
|
38
|
+
style: [styles.cell, {
|
|
39
|
+
backgroundColor: bgColor
|
|
40
|
+
}],
|
|
41
|
+
onHoverIn: activate,
|
|
42
|
+
onHoverOut: deactivate,
|
|
43
|
+
onPressIn: activate,
|
|
44
|
+
onPressOut: deactivate,
|
|
45
|
+
children: [isMastered && /*#__PURE__*/_jsx(StarFillIcon, {
|
|
46
|
+
color: isActive ? COLORS.PRIMARY_YELLOW : undefined
|
|
47
|
+
}), label !== null && /*#__PURE__*/_jsx(Text, {
|
|
48
|
+
style: typeof label === 'string' ? styles.symbolText : styles.headerText,
|
|
49
|
+
children: label
|
|
50
|
+
})]
|
|
37
51
|
})]
|
|
38
52
|
});
|
|
39
53
|
};
|
|
40
54
|
const styles = StyleSheet.create({
|
|
55
|
+
wrapper: {
|
|
56
|
+
flex: 1
|
|
57
|
+
},
|
|
58
|
+
wrapperActive: {
|
|
59
|
+
zIndex: 1
|
|
60
|
+
},
|
|
41
61
|
cell: {
|
|
42
62
|
flex: 1,
|
|
43
63
|
borderRadius: BORDER_RADIUS[100],
|
|
44
64
|
alignItems: 'center',
|
|
45
65
|
justifyContent: 'center'
|
|
46
66
|
},
|
|
47
|
-
|
|
67
|
+
tooltipContainer: {
|
|
48
68
|
position: 'absolute',
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
fontWeight: '500',
|
|
55
|
-
color: COLORS.NEUTRAL_1,
|
|
56
|
-
lineHeight: SPACING[300]
|
|
57
|
-
},
|
|
58
|
-
cellNumber: {
|
|
59
|
-
fontSize: 14,
|
|
60
|
-
fontWeight: '700',
|
|
61
|
-
color: COLORS.NEUTRAL_3,
|
|
62
|
-
lineHeight: SPACING[400]
|
|
69
|
+
bottom: '100%',
|
|
70
|
+
left: 0,
|
|
71
|
+
right: 0,
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
paddingBottom: SPACING[50]
|
|
63
74
|
},
|
|
64
75
|
headerText: {
|
|
65
76
|
fontSize: 12,
|
|
66
77
|
fontWeight: '600',
|
|
67
78
|
color: COLORS.NEUTRAL_8
|
|
79
|
+
},
|
|
80
|
+
symbolText: {
|
|
81
|
+
fontSize: 24,
|
|
82
|
+
color: COLORS.NEUTRAL_7
|
|
68
83
|
}
|
|
69
84
|
});
|
|
70
85
|
//# sourceMappingURL=MatrixCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","BORDER_RADIUS","COLORS","SPACING","getMasteryLevelByBox","FluencyMasteryLevel","StarFillIcon","
|
|
1
|
+
{"version":3,"names":["React","useState","Pressable","View","Text","StyleSheet","BORDER_RADIUS","COLORS","SPACING","getMasteryLevelByBox","FluencyMasteryLevel","StarFillIcon","CellTooltip","jsx","_jsx","jsxs","_jsxs","MatrixCell","label","box","isHeader","levelColors","tooltipLabel","isActive","setIsActive","masteryLevel","isMastered","MASTERED","bgColor","NEUTRAL_5","NEUTRAL_2","showTooltip","activate","deactivate","style","styles","wrapper","wrapperActive","children","tooltipContainer","pointerEvents","cell","backgroundColor","onHoverIn","onHoverOut","onPressIn","onPressOut","color","PRIMARY_YELLOW","undefined","symbolText","headerText","create","flex","zIndex","borderRadius","alignItems","justifyContent","position","bottom","left","right","paddingBottom","fontSize","fontWeight","NEUTRAL_8","NEUTRAL_7"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/matrix/components/MatrixCell.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,SAAS,EAAEC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAChE,SAASC,aAAa,EAAEC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AAC3E,SAASC,oBAAoB,QAAQ,6BAA0B;AAC/D,SAASC,mBAAmB,QAAQ,+BAA4B;AAChE,SAASC,YAAY,QAAQ,iCAA8B;AAC3D,SAASC,WAAW,QAAQ,kBAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAS3C,OAAO,MAAMC,UAAU,GAAGA,CAAC;EAAEC,KAAK;EAAEC,GAAG;EAAEC,QAAQ;EAAEC,WAAW;EAAEC;AAA8B,CAAC,KAAK;EAClG,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGvB,QAAQ,CAAC,KAAK,CAAC;EAC/C,MAAMwB,YAAY,GAAGN,GAAG,GAAGV,oBAAoB,CAACU,GAAG,CAAC,GAAG,IAAI;EAC3D,MAAMO,UAAU,GAAGD,YAAY,KAAKf,mBAAmB,CAACiB,QAAQ;EAEhE,MAAMC,OAAO,GAAG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AAK,CACF,CACP;IAAA,CACQ,CAAC;EAAA,CACR,CAAC;AAEX,CAAC;AAED,MAAMiB,MAAM,GAAG9B,UAAU,CAAC+C,MAAM,CAAC;EAC/BhB,OAAO,EAAE;IACPiB,IAAI,EAAE;EACR,CAAC;EACDhB,aAAa,EAAE;IACbiB,MAAM,EAAE;EACV,CAAC;EACDb,IAAI,EAAE;IACJY,IAAI,EAAE,CAAC;IACPE,YAAY,EAAEjD,aAAa,CAAC,GAAG,CAAC;IAChCkD,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDlB,gBAAgB,EAAE;IAChBmB,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,MAAM;IACdC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRL,UAAU,EAAE,QAAQ;IACpBM,aAAa,EAAEtD,OAAO,CAAC,EAAE;EAC3B,CAAC;EACD2C,UAAU,EAAE;IACVY,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBjB,KAAK,EAAExC,MAAM,CAAC0D;EAChB,CAAC;EACDf,UAAU,EAAE;IACVa,QAAQ,EAAE,EAAE;IACZhB,KAAK,EAAExC,MAAM,CAAC2D;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -19,10 +19,16 @@ export const MatrixFill = () => {
|
|
|
19
19
|
style: styles.grid,
|
|
20
20
|
children: grid.map((row, rowIdx) => /*#__PURE__*/_jsx(View, {
|
|
21
21
|
style: styles.row,
|
|
22
|
-
children: row.map((cell, colIdx) =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
children: row.map((cell, colIdx) => {
|
|
23
|
+
const isOriginCell = rowIdx === 0 && colIdx === 0;
|
|
24
|
+
const tooltipLabel = cell.numbers ? `${cell.numbers[0]}${modePreset.symbol}${cell.numbers[1]}` : null;
|
|
25
|
+
return /*#__PURE__*/_jsx(MatrixCell, {
|
|
26
|
+
...cell,
|
|
27
|
+
label: isOriginCell ? modePreset.symbol : cell.label,
|
|
28
|
+
levelColors: modePreset.colors.level,
|
|
29
|
+
tooltipLabel: tooltipLabel
|
|
30
|
+
}, colIdx);
|
|
31
|
+
})
|
|
26
32
|
}, rowIdx))
|
|
27
33
|
});
|
|
28
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","SPACING","useUnit","MatrixCell","useFluency","useFluencyModePreset","jsx","_jsx","MatrixFill","model","modePreset","grid","matrix","$matrix","style","styles","children","map","row","rowIdx","cell","colIdx","levelColors","colors","level","create","flex","gap","minHeight","flexDirection"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/matrix/components/MatrixFill.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,4BAA4B;AACpD,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,UAAU,QAAQ,oCAAiC;AAC5D,SAASC,oBAAoB,QAAQ,wCAAqC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE1E,OAAO,MAAMC,UAAU,GAAGA,CAAA,KAAM;EAC9B,MAAM;IAAEC;EAAM,CAAC,GAAGL,UAAU,CAAC,CAAC;EAC9B,MAAMM,UAAU,GAAGL,oBAAoB,CAAC,CAAC;EACzC,MAAMM,IAAI,GAAGT,OAAO,CAACO,KAAK,CAACG,MAAM,CAACC,OAAO,CAAC;EAE1C,IAAI,CAACF,IAAI,EAAE,OAAO,IAAI;EAEtB,oBACEJ,IAAA,CAACR,IAAI;IAACe,KAAK,EAAEC,MAAM,CAACJ,IAAK;IAAAK,QAAA,EACtBL,IAAI,CAACM,GAAG,CAAC,CAACC,GAAG,EAAEC,MAAM,kBACpBZ,IAAA,CAACR,IAAI;MAAce,KAAK,EAAEC,MAAM,CAACG,GAAI;MAAAF,QAAA,EAClCE,GAAG,CAACD,GAAG,CAAC,CAACG,IAAI,EAAEC,MAAM,
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","SPACING","useUnit","MatrixCell","useFluency","useFluencyModePreset","jsx","_jsx","MatrixFill","model","modePreset","grid","matrix","$matrix","style","styles","children","map","row","rowIdx","cell","colIdx","isOriginCell","tooltipLabel","numbers","symbol","label","levelColors","colors","level","create","flex","gap","minHeight","flexDirection"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/matrix/components/MatrixFill.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,4BAA4B;AACpD,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,UAAU,QAAQ,oCAAiC;AAC5D,SAASC,oBAAoB,QAAQ,wCAAqC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE1E,OAAO,MAAMC,UAAU,GAAGA,CAAA,KAAM;EAC9B,MAAM;IAAEC;EAAM,CAAC,GAAGL,UAAU,CAAC,CAAC;EAC9B,MAAMM,UAAU,GAAGL,oBAAoB,CAAC,CAAC;EACzC,MAAMM,IAAI,GAAGT,OAAO,CAACO,KAAK,CAACG,MAAM,CAACC,OAAO,CAAC;EAE1C,IAAI,CAACF,IAAI,EAAE,OAAO,IAAI;EAEtB,oBACEJ,IAAA,CAACR,IAAI;IAACe,KAAK,EAAEC,MAAM,CAACJ,IAAK;IAAAK,QAAA,EACtBL,IAAI,CAACM,GAAG,CAAC,CAACC,GAAG,EAAEC,MAAM,kBACpBZ,IAAA,CAACR,IAAI;MAAce,KAAK,EAAEC,MAAM,CAACG,GAAI;MAAAF,QAAA,EAClCE,GAAG,CAACD,GAAG,CAAC,CAACG,IAAI,EAAEC,MAAM,KAAK;QACzB,MAAMC,YAAY,GAAGH,MAAM,KAAK,CAAC,IAAIE,MAAM,KAAK,CAAC;QACjD,MAAME,YAAY,GAAGH,IAAI,CAACI,OAAO,GAC7B,GAAGJ,IAAI,CAACI,OAAO,CAAC,CAAC,CAAC,GAAGd,UAAU,CAACe,MAAM,GAAGL,IAAI,CAACI,OAAO,CAAC,CAAC,CAAC,EAAE,GAC1D,IAAI;QAER,oBACEjB,IAAA,CAACJ,UAAU;UAAA,GAELiB,IAAI;UACRM,KAAK,EAAEJ,YAAY,GAAGZ,UAAU,CAACe,MAAM,GAAGL,IAAI,CAACM,KAAM;UACrDC,WAAW,EAAEjB,UAAU,CAACkB,MAAM,CAACC,KAAM;UACrCN,YAAY,EAAEA;QAAa,GAJtBF,MAKN,CAAC;MAEN,CAAC;IAAC,GAhBOF,MAiBL,CACP;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMJ,MAAM,GAAGf,UAAU,CAAC8B,MAAM,CAAC;EAC/BnB,IAAI,EAAE;IACJoB,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE/B,OAAO,CAAC,GAAG;EAClB,CAAC;EACDiB,GAAG,EAAE;IACHa,IAAI,EAAE,CAAC;IACPE,SAAS,EAAEhC,OAAO,CAAC,GAAG,CAAC;IACvBiC,aAAa,EAAE,KAAK;IACpBF,GAAG,EAAE/B,OAAO,CAAC,GAAG;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,13 +6,16 @@ import { BORDER_RADIUS, Button, ButtonSize, ButtonVariant, COLORS, PlayIcon, SHA
|
|
|
6
6
|
import { useFluencyModePreset } from "../../../hooks/useFluencyModePreset.js";
|
|
7
7
|
import { useFluency } from "../../../context/FluencyContext.js";
|
|
8
8
|
import { useText } from "../../../../../i18n/i18n.js";
|
|
9
|
+
import { useUnit } from 'effector-react';
|
|
9
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
11
|
export const MatrixLegend = () => {
|
|
11
12
|
const t = useText();
|
|
12
13
|
const modePreset = useFluencyModePreset();
|
|
13
14
|
const {
|
|
15
|
+
model,
|
|
14
16
|
onPracticePress
|
|
15
17
|
} = useFluency();
|
|
18
|
+
const mode = useUnit(model.matrix.$mode);
|
|
16
19
|
return /*#__PURE__*/_jsxs(View, {
|
|
17
20
|
style: styles.container,
|
|
18
21
|
children: [/*#__PURE__*/_jsx(View, {
|
|
@@ -29,7 +32,10 @@ export const MatrixLegend = () => {
|
|
|
29
32
|
})]
|
|
30
33
|
}, item.label))
|
|
31
34
|
}), /*#__PURE__*/_jsx(Button, {
|
|
32
|
-
onPress:
|
|
35
|
+
onPress: () => {
|
|
36
|
+
model.solving.start(mode);
|
|
37
|
+
onPracticePress?.();
|
|
38
|
+
},
|
|
33
39
|
variant: ButtonVariant.PRIMARY,
|
|
34
40
|
size: ButtonSize.MEDIUM,
|
|
35
41
|
colorScheme: modePreset.colors.button,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","BORDER_RADIUS","Button","ButtonSize","ButtonVariant","COLORS","PlayIcon","SHADOWS","SPACING","useFluencyModePreset","useFluency","useText","jsx","_jsx","jsxs","_jsxs","MatrixLegend","t","modePreset","onPracticePress","style","styles","container","children","legendItems","legend","items","map","item","legendItem","legendDot","backgroundColor","color","withBorder","legendDotBorder","legendLabel","label","onPress","variant","PRIMARY","size","MEDIUM","colorScheme","colors","button","icon","NEUTRAL_1","raiseLevel","practiceButton","text","practiceButtonText","create","height","flexDirection","alignItems","justifyContent","NEUTRAL_2","borderBottomColor","NEUTRAL_5","paddingHorizontal","paddingVertical","borderTopLeftRadius","borderTopRightRadius","gap","width","borderRadius","borderWidth","borderColor","fontSize","NEUTRAL_7","alignSelf","textTransform"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/matrix/components/MatrixLegend.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SACEC,aAAa,EACbC,MAAM,EACNC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,OAAO,QACF,4BAA4B;AACnC,SAASC,oBAAoB,QAAQ,wCAAqC;AAC1E,SAASC,UAAU,QAAQ,oCAAiC;AAC5D,SAASC,OAAO,QAAQ,6BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","BORDER_RADIUS","Button","ButtonSize","ButtonVariant","COLORS","PlayIcon","SHADOWS","SPACING","useFluencyModePreset","useFluency","useText","useUnit","jsx","_jsx","jsxs","_jsxs","MatrixLegend","t","modePreset","model","onPracticePress","mode","matrix","$mode","style","styles","container","children","legendItems","legend","items","map","item","legendItem","legendDot","backgroundColor","color","withBorder","legendDotBorder","legendLabel","label","onPress","solving","start","variant","PRIMARY","size","MEDIUM","colorScheme","colors","button","icon","NEUTRAL_1","raiseLevel","practiceButton","text","practiceButtonText","create","height","flexDirection","alignItems","justifyContent","NEUTRAL_2","borderBottomColor","NEUTRAL_5","paddingHorizontal","paddingVertical","borderTopLeftRadius","borderTopRightRadius","gap","width","borderRadius","borderWidth","borderColor","fontSize","NEUTRAL_7","alignSelf","textTransform"],"sourceRoot":"../../../../../../../src","sources":["features/fluency/components/matrix/components/MatrixLegend.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SACEC,aAAa,EACbC,MAAM,EACNC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,OAAO,QACF,4BAA4B;AACnC,SAASC,oBAAoB,QAAQ,wCAAqC;AAC1E,SAASC,UAAU,QAAQ,oCAAiC;AAC5D,SAASC,OAAO,QAAQ,6BAA0B;AAClD,SAASC,OAAO,QAAQ,gBAAgB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExC,OAA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eAAe,EAAE;IACfkC,WAAW,EAAE,GAAG;IAChBC,WAAW,EAAErE,MAAM,CAAC4D;EACtB,CAAC;EACDzB,WAAW,EAAE;IACXmC,QAAQ,EAAE,EAAE;IACZtC,KAAK,EAAEhC,MAAM,CAACuE;EAChB,CAAC;EACDrB,cAAc,EAAE;IACdsB,SAAS,EAAE;EACb,CAAC;EACDpB,kBAAkB,EAAE;IAClBqB,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,56 +4,6 @@ import React from 'react';
|
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { BORDER_RADIUS, COLORS, HeadingVariants, SelectOptionColor, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const PROGRESS_COLOR_SHADES = {
|
|
8
|
-
[SelectOptionColor.GREEN]: {
|
|
9
|
-
low: COLORS.GREEN_2,
|
|
10
|
-
medium: COLORS.GREEN_3,
|
|
11
|
-
high: COLORS.GREEN_6,
|
|
12
|
-
max: COLORS.GREEN_7
|
|
13
|
-
},
|
|
14
|
-
[SelectOptionColor.ORANGE]: {
|
|
15
|
-
low: COLORS.ORANGE_2,
|
|
16
|
-
medium: COLORS.ORANGE_3,
|
|
17
|
-
high: COLORS.ORANGE_6,
|
|
18
|
-
max: COLORS.ORANGE_7
|
|
19
|
-
},
|
|
20
|
-
[SelectOptionColor.BLUE]: {
|
|
21
|
-
low: COLORS.BLUE_2,
|
|
22
|
-
medium: COLORS.BLUE_3,
|
|
23
|
-
high: COLORS.BLUE_6,
|
|
24
|
-
max: COLORS.BLUE_7
|
|
25
|
-
},
|
|
26
|
-
[SelectOptionColor.RED]: {
|
|
27
|
-
low: COLORS.RED_2,
|
|
28
|
-
medium: COLORS.RED_3,
|
|
29
|
-
high: COLORS.RED_6,
|
|
30
|
-
max: COLORS.RED_7
|
|
31
|
-
},
|
|
32
|
-
[SelectOptionColor.YELLOW]: {
|
|
33
|
-
low: COLORS.YELLOW_2,
|
|
34
|
-
medium: COLORS.YELLOW_3,
|
|
35
|
-
high: COLORS.YELLOW_6,
|
|
36
|
-
max: COLORS.YELLOW_7
|
|
37
|
-
},
|
|
38
|
-
[SelectOptionColor.PURPLE]: {
|
|
39
|
-
low: COLORS.PURPLE_2,
|
|
40
|
-
medium: COLORS.PURPLE_3,
|
|
41
|
-
high: COLORS.PURPLE_6,
|
|
42
|
-
max: COLORS.PURPLE_7
|
|
43
|
-
},
|
|
44
|
-
[SelectOptionColor.GREY]: {
|
|
45
|
-
low: COLORS.NEUTRAL_2,
|
|
46
|
-
medium: COLORS.NEUTRAL_3,
|
|
47
|
-
high: COLORS.NEUTRAL_6,
|
|
48
|
-
max: COLORS.NEUTRAL_7
|
|
49
|
-
},
|
|
50
|
-
[SelectOptionColor.SUNSET]: {
|
|
51
|
-
low: COLORS.RED_2,
|
|
52
|
-
medium: COLORS.RED_3,
|
|
53
|
-
high: COLORS.RED_6,
|
|
54
|
-
max: COLORS.RED_7
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
7
|
const PRIMARY_COLOR_MAP = {
|
|
58
8
|
[SelectOptionColor.GREEN]: COLORS.PRIMARY_GREEN,
|
|
59
9
|
[SelectOptionColor.ORANGE]: COLORS.PRIMARY_ORANGE,
|
|
@@ -64,18 +14,12 @@ const PRIMARY_COLOR_MAP = {
|
|
|
64
14
|
[SelectOptionColor.GREY]: COLORS.NEUTRAL_6,
|
|
65
15
|
[SelectOptionColor.SUNSET]: COLORS.PRIMARY_RED
|
|
66
16
|
};
|
|
67
|
-
const getFillColor = (shades, progress) => {
|
|
68
|
-
if (progress <= 10) return shades.low;
|
|
69
|
-
if (progress <= 20) return shades.medium;
|
|
70
|
-
if (progress <= 80) return shades.high;
|
|
71
|
-
return shades.max;
|
|
72
|
-
};
|
|
73
17
|
export const ProgressBar = ({
|
|
74
18
|
progress,
|
|
75
19
|
color = SelectOptionColor.GREEN
|
|
76
20
|
}) => {
|
|
77
21
|
const normalized = Math.round(Math.min(100, Math.max(0, progress)));
|
|
78
|
-
const fillColor =
|
|
22
|
+
const fillColor = PRIMARY_COLOR_MAP[color];
|
|
79
23
|
const textColor = PRIMARY_COLOR_MAP[color];
|
|
80
24
|
return /*#__PURE__*/_jsxs(View, {
|
|
81
25
|
style: styles.container,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","BORDER_RADIUS","COLORS","HeadingVariants","SelectOptionColor","SPACING","Typography","jsx","_jsx","jsxs","_jsxs","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","BORDER_RADIUS","COLORS","HeadingVariants","SelectOptionColor","SPACING","Typography","jsx","_jsx","jsxs","_jsxs","PRIMARY_COLOR_MAP","GREEN","PRIMARY_GREEN","ORANGE","PRIMARY_ORANGE","BLUE","PRIMARY_BLUE","RED","PRIMARY_RED","YELLOW","PRIMARY_YELLOW","PURPLE","PRIMARY_PURPLE","GREY","NEUTRAL_6","SUNSET","ProgressBar","progress","color","normalized","Math","round","min","max","fillColor","textColor","style","styles","container","children","track","fill","backgroundColor","width","variant","H10","create","flexDirection","marginTop","gap","alignItems","flex","height","NEUTRAL_3","borderRadius","overflow"],"sourceRoot":"../../../../../../src","sources":["features/fluency/components/select-math-operator/ProgressBar.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SACEC,aAAa,EACbC,MAAM,EACNC,eAAe,EACfC,iBAAiB,EACjBC,OAAO,EACPC,UAAU,QACL,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEnC,MAAMC,iBAAoD,GAAG;EAC3D,CAACP,iBAAiB,CAACQ,KAAK,GAAGV,MAAM,CAACW,aAAa;EAC/C,CAACT,iBAAiB,CAACU,MAAM,GAAGZ,MAAM,CAACa,cAAc;EACjD,CAAC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,GACd;IAAA,CAAY,CAAC;EAAA,CACT,CAAC;AAEX,CAAC;AAED,MAAMQ,MAAM,GAAGvC,UAAU,CAACgD,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,aAAa,EAAE,KAAK;IACpBC,SAAS,EAAE5C,OAAO,CAAC,GAAG,CAAC;IACvB6C,GAAG,EAAE7C,OAAO,CAAC,GAAG,CAAC;IACjB8C,UAAU,EAAE;EACd,CAAC;EACDV,KAAK,EAAE;IACLW,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,EAAE;IACVV,eAAe,EAAEzC,MAAM,CAACoD,SAAS;IACjCC,YAAY,EAAEtD,aAAa,CAAC,GAAG,CAAC;IAChCuD,QAAQ,EAAE;EACZ,CAAC;EACDd,IAAI,EAAE;IACJW,MAAM,EAAE,MAAM;IACdE,YAAY,EAAEtD,aAAa,CAAC,GAAG;EACjC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
|
-
import { BORDER_RADIUS, COLORS, SHADOWS, SPACING } from '@magmamath/react-native-ui';
|
|
5
|
+
import { BORDER_RADIUS, COLORS, HeadingVariants, SHADOWS, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
6
6
|
import { useUnit } from 'effector-react';
|
|
7
7
|
import { FLUENCY_MODES } from "../../fluency.constants.js";
|
|
8
8
|
import { MathOperatorRow } from "./MathOperatorRow.js";
|
|
@@ -22,15 +22,17 @@ export const SelectMathOperator = () => {
|
|
|
22
22
|
children: FLUENCY_MODES.map(({
|
|
23
23
|
mode,
|
|
24
24
|
label,
|
|
25
|
-
|
|
25
|
+
symbol,
|
|
26
26
|
select
|
|
27
27
|
}, index) => {
|
|
28
28
|
const isSelectedMode = mode === fluencyMode;
|
|
29
29
|
const progress = (matrix?.operations[mode].completionRate ?? 0) * 100;
|
|
30
30
|
return /*#__PURE__*/_jsx(MathOperatorRow, {
|
|
31
31
|
title: t(label),
|
|
32
|
-
icon: /*#__PURE__*/_jsx(
|
|
33
|
-
|
|
32
|
+
icon: /*#__PURE__*/_jsx(Typography, {
|
|
33
|
+
variant: HeadingVariants.H6,
|
|
34
|
+
style: [styles.symbol, isSelectedMode && styles.symbolSelected],
|
|
35
|
+
children: symbol
|
|
34
36
|
}),
|
|
35
37
|
progress: progress,
|
|
36
38
|
color: select,
|
|
@@ -48,11 +50,17 @@ const styles = StyleSheet.create({
|
|
|
48
50
|
container: {
|
|
49
51
|
alignSelf: 'flex-start',
|
|
50
52
|
width: 270,
|
|
51
|
-
|
|
52
|
-
paddingHorizontal: SPACING[200],
|
|
53
|
+
padding: SPACING[400],
|
|
53
54
|
borderRadius: BORDER_RADIUS[400],
|
|
54
55
|
backgroundColor: COLORS.NEUTRAL_1,
|
|
55
56
|
...SHADOWS[1]
|
|
57
|
+
},
|
|
58
|
+
symbol: {
|
|
59
|
+
fontSize: 32,
|
|
60
|
+
fontWeight: '100'
|
|
61
|
+
},
|
|
62
|
+
symbolSelected: {
|
|
63
|
+
color: COLORS.NEUTRAL_1
|
|
56
64
|
}
|
|
57
65
|
});
|
|
58
66
|
//# sourceMappingURL=SelectMathOperator.js.map
|