@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.
Files changed (322) hide show
  1. package/dist/commonjs/features/fluency/assets/DivideIcon.js +32 -0
  2. package/dist/commonjs/features/fluency/assets/DivideIcon.js.map +1 -0
  3. package/dist/commonjs/features/fluency/assets/SpringIcon.js +29 -0
  4. package/dist/commonjs/features/fluency/assets/SpringIcon.js.map +1 -0
  5. package/dist/commonjs/features/fluency/assets/StarFillIcon.js +29 -0
  6. package/dist/commonjs/features/fluency/assets/StarFillIcon.js.map +1 -0
  7. package/dist/commonjs/features/fluency/components/Fluency.js +98 -0
  8. package/dist/commonjs/features/fluency/components/Fluency.js.map +1 -0
  9. package/dist/commonjs/features/fluency/components/FluencySolving.js +42 -0
  10. package/dist/commonjs/features/fluency/components/FluencySolving.js.map +1 -0
  11. package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js +91 -0
  12. package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -0
  13. package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js +73 -0
  14. package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -0
  15. package/dist/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.js +123 -0
  16. package/dist/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.js.map +1 -0
  17. package/dist/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.js +183 -0
  18. package/dist/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.js.map +1 -0
  19. package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.js +64 -0
  20. package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.js.map +1 -0
  21. package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.js +71 -0
  22. package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.js.map +1 -0
  23. package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.js +47 -0
  24. package/dist/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.js.map +1 -0
  25. package/dist/commonjs/features/fluency/components/matrix/FluencyMatrix.js +36 -0
  26. package/dist/commonjs/features/fluency/components/matrix/FluencyMatrix.js.map +1 -0
  27. package/dist/commonjs/features/fluency/components/matrix/components/MatrixCell.js +47 -0
  28. package/dist/commonjs/features/fluency/components/matrix/components/MatrixCell.js.map +1 -0
  29. package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js +57 -0
  30. package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js.map +1 -0
  31. package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js +105 -0
  32. package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -0
  33. package/dist/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.js +43 -0
  34. package/dist/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.js.map +1 -0
  35. package/dist/commonjs/features/fluency/components/select-math-operator/ProgressBar.js +124 -0
  36. package/dist/commonjs/features/fluency/components/select-math-operator/ProgressBar.js.map +1 -0
  37. package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js +63 -0
  38. package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -0
  39. package/dist/commonjs/features/fluency/components/start-banner/BannerFlashcards.js +80 -0
  40. package/dist/commonjs/features/fluency/components/start-banner/BannerFlashcards.js.map +1 -0
  41. package/dist/commonjs/features/fluency/components/start-banner/MathFlashcard.js +73 -0
  42. package/dist/commonjs/features/fluency/components/start-banner/MathFlashcard.js.map +1 -0
  43. package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js +111 -0
  44. package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js.map +1 -0
  45. package/dist/commonjs/features/fluency/context/FluencyContext.js +16 -0
  46. package/dist/commonjs/features/fluency/context/FluencyContext.js.map +1 -0
  47. package/dist/commonjs/features/fluency/fluency.constants.js +80 -0
  48. package/dist/commonjs/features/fluency/fluency.constants.js.map +1 -0
  49. package/dist/commonjs/features/fluency/fluency.helpers.js +67 -0
  50. package/dist/commonjs/features/fluency/fluency.helpers.js.map +1 -0
  51. package/dist/commonjs/features/fluency/fluency.types.js +6 -0
  52. package/dist/commonjs/features/fluency/fluency.types.js.map +1 -0
  53. package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js +39 -0
  54. package/dist/commonjs/features/fluency/hooks/useFluencyModePreset.js.map +1 -0
  55. package/dist/commonjs/features/fluency/index.js +68 -0
  56. package/dist/commonjs/features/fluency/index.js.map +1 -0
  57. package/dist/commonjs/features/fluency/model/FluencyApiModel.js +11 -0
  58. package/dist/commonjs/features/fluency/model/FluencyApiModel.js.map +1 -0
  59. package/dist/commonjs/features/fluency/model/FluencyDaysStreakModel.js +9 -0
  60. package/dist/commonjs/features/fluency/model/FluencyDaysStreakModel.js.map +1 -0
  61. package/dist/commonjs/features/fluency/model/FluencyInputModel.js +23 -0
  62. package/dist/commonjs/features/fluency/model/FluencyInputModel.js.map +1 -0
  63. package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js +9 -0
  64. package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js.map +1 -0
  65. package/dist/commonjs/features/fluency/model/FluencyModel.js +28 -0
  66. package/dist/commonjs/features/fluency/model/FluencyModel.js.map +1 -0
  67. package/dist/commonjs/features/fluency/model/FluencySolvingModel.js +9 -0
  68. package/dist/commonjs/features/fluency/model/FluencySolvingModel.js.map +1 -0
  69. package/dist/commonjs/index.js +12 -0
  70. package/dist/commonjs/index.js.map +1 -1
  71. package/dist/module/features/fluency/assets/DivideIcon.js +24 -0
  72. package/dist/module/features/fluency/assets/DivideIcon.js.map +1 -0
  73. package/dist/module/features/fluency/assets/SpringIcon.js +22 -0
  74. package/dist/module/features/fluency/assets/SpringIcon.js.map +1 -0
  75. package/dist/module/features/fluency/assets/StarFillIcon.js +21 -0
  76. package/dist/module/features/fluency/assets/StarFillIcon.js.map +1 -0
  77. package/dist/module/features/fluency/components/Fluency.js +92 -0
  78. package/dist/module/features/fluency/components/Fluency.js.map +1 -0
  79. package/dist/module/features/fluency/components/FluencySolving.js +36 -0
  80. package/dist/module/features/fluency/components/FluencySolving.js.map +1 -0
  81. package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js +85 -0
  82. package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -0
  83. package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js +67 -0
  84. package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -0
  85. package/dist/module/features/fluency/components/fluency-solving/FluencyEquationCard.js +117 -0
  86. package/dist/module/features/fluency/components/fluency-solving/FluencyEquationCard.js.map +1 -0
  87. package/dist/module/features/fluency/components/fluency-solving/FluencyNumpad.js +177 -0
  88. package/dist/module/features/fluency/components/fluency-solving/FluencyNumpad.js.map +1 -0
  89. package/dist/module/features/fluency/components/fluency-solving/FluencySolvingCard.js +57 -0
  90. package/dist/module/features/fluency/components/fluency-solving/FluencySolvingCard.js.map +1 -0
  91. package/dist/module/features/fluency/components/fluency-solving/FluencySolvingHeader.js +65 -0
  92. package/dist/module/features/fluency/components/fluency-solving/FluencySolvingHeader.js.map +1 -0
  93. package/dist/module/features/fluency/components/fluency-solving/FluencySolvingProgress.js +41 -0
  94. package/dist/module/features/fluency/components/fluency-solving/FluencySolvingProgress.js.map +1 -0
  95. package/dist/module/features/fluency/components/matrix/FluencyMatrix.js +30 -0
  96. package/dist/module/features/fluency/components/matrix/FluencyMatrix.js.map +1 -0
  97. package/dist/module/features/fluency/components/matrix/components/MatrixCell.js +41 -0
  98. package/dist/module/features/fluency/components/matrix/components/MatrixCell.js.map +1 -0
  99. package/dist/module/features/fluency/components/matrix/components/MatrixFill.js +51 -0
  100. package/dist/module/features/fluency/components/matrix/components/MatrixFill.js.map +1 -0
  101. package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js +99 -0
  102. package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -0
  103. package/dist/module/features/fluency/components/select-math-operator/MathOperatorRow.js +37 -0
  104. package/dist/module/features/fluency/components/select-math-operator/MathOperatorRow.js.map +1 -0
  105. package/dist/module/features/fluency/components/select-math-operator/ProgressBar.js +118 -0
  106. package/dist/module/features/fluency/components/select-math-operator/ProgressBar.js.map +1 -0
  107. package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js +57 -0
  108. package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -0
  109. package/dist/module/features/fluency/components/start-banner/BannerFlashcards.js +74 -0
  110. package/dist/module/features/fluency/components/start-banner/BannerFlashcards.js.map +1 -0
  111. package/dist/module/features/fluency/components/start-banner/MathFlashcard.js +67 -0
  112. package/dist/module/features/fluency/components/start-banner/MathFlashcard.js.map +1 -0
  113. package/dist/module/features/fluency/components/start-banner/StartBanner.js +105 -0
  114. package/dist/module/features/fluency/components/start-banner/StartBanner.js.map +1 -0
  115. package/dist/module/features/fluency/context/FluencyContext.js +11 -0
  116. package/dist/module/features/fluency/context/FluencyContext.js.map +1 -0
  117. package/dist/module/features/fluency/fluency.constants.js +77 -0
  118. package/dist/module/features/fluency/fluency.constants.js.map +1 -0
  119. package/dist/module/features/fluency/fluency.helpers.js +58 -0
  120. package/dist/module/features/fluency/fluency.helpers.js.map +1 -0
  121. package/dist/module/features/fluency/fluency.types.js +4 -0
  122. package/dist/module/features/fluency/fluency.types.js.map +1 -0
  123. package/dist/module/features/fluency/hooks/useFluencyModePreset.js +34 -0
  124. package/dist/module/features/fluency/hooks/useFluencyModePreset.js.map +1 -0
  125. package/dist/module/features/fluency/index.js +9 -0
  126. package/dist/module/features/fluency/index.js.map +1 -0
  127. package/dist/module/features/fluency/model/FluencyApiModel.js +6 -0
  128. package/dist/module/features/fluency/model/FluencyApiModel.js.map +1 -0
  129. package/dist/module/features/fluency/model/FluencyDaysStreakModel.js +4 -0
  130. package/dist/module/features/fluency/model/FluencyDaysStreakModel.js.map +1 -0
  131. package/dist/module/features/fluency/model/FluencyInputModel.js +18 -0
  132. package/dist/module/features/fluency/model/FluencyInputModel.js.map +1 -0
  133. package/dist/module/features/fluency/model/FluencyMatrixModel.js +4 -0
  134. package/dist/module/features/fluency/model/FluencyMatrixModel.js.map +1 -0
  135. package/dist/module/features/fluency/model/FluencyModel.js +23 -0
  136. package/dist/module/features/fluency/model/FluencyModel.js.map +1 -0
  137. package/dist/module/features/fluency/model/FluencySolvingModel.js +4 -0
  138. package/dist/module/features/fluency/model/FluencySolvingModel.js.map +1 -0
  139. package/dist/module/index.js +1 -0
  140. package/dist/module/index.js.map +1 -1
  141. package/dist/typescript/commonjs/features/fluency/__tests__/FluencyModel.test.d.ts +2 -0
  142. package/dist/typescript/commonjs/features/fluency/__tests__/FluencyModel.test.d.ts.map +1 -0
  143. package/dist/typescript/commonjs/features/fluency/assets/DivideIcon.d.ts +8 -0
  144. package/dist/typescript/commonjs/features/fluency/assets/DivideIcon.d.ts.map +1 -0
  145. package/dist/typescript/commonjs/features/fluency/assets/SpringIcon.d.ts +3 -0
  146. package/dist/typescript/commonjs/features/fluency/assets/SpringIcon.d.ts.map +1 -0
  147. package/dist/typescript/commonjs/features/fluency/assets/StarFillIcon.d.ts +3 -0
  148. package/dist/typescript/commonjs/features/fluency/assets/StarFillIcon.d.ts.map +1 -0
  149. package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts +13 -0
  150. package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts.map +1 -0
  151. package/dist/typescript/commonjs/features/fluency/components/FluencySolving.d.ts +9 -0
  152. package/dist/typescript/commonjs/features/fluency/components/FluencySolving.d.ts.map +1 -0
  153. package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts +11 -0
  154. package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -0
  155. package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts +3 -0
  156. package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -0
  157. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts +12 -0
  158. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts.map +1 -0
  159. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.d.ts +3 -0
  160. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencyNumpad.d.ts.map +1 -0
  161. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts +3 -0
  162. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts.map +1 -0
  163. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts +7 -0
  164. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts.map +1 -0
  165. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts +8 -0
  166. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts.map +1 -0
  167. package/dist/typescript/commonjs/features/fluency/components/matrix/FluencyMatrix.d.ts +3 -0
  168. package/dist/typescript/commonjs/features/fluency/components/matrix/FluencyMatrix.d.ts.map +1 -0
  169. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts +11 -0
  170. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -0
  171. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixFill.d.ts +3 -0
  172. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -0
  173. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixLegend.d.ts +5 -0
  174. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixLegend.d.ts.map +1 -0
  175. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.d.ts +13 -0
  176. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.d.ts.map +1 -0
  177. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/ProgressBar.d.ts +8 -0
  178. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/ProgressBar.d.ts.map +1 -0
  179. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.d.ts +3 -0
  180. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -0
  181. package/dist/typescript/commonjs/features/fluency/components/start-banner/BannerFlashcards.d.ts +11 -0
  182. package/dist/typescript/commonjs/features/fluency/components/start-banner/BannerFlashcards.d.ts.map +1 -0
  183. package/dist/typescript/commonjs/features/fluency/components/start-banner/MathFlashcard.d.ts +28 -0
  184. package/dist/typescript/commonjs/features/fluency/components/start-banner/MathFlashcard.d.ts.map +1 -0
  185. package/dist/typescript/commonjs/features/fluency/components/start-banner/StartBanner.d.ts +3 -0
  186. package/dist/typescript/commonjs/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -0
  187. package/dist/typescript/commonjs/features/fluency/context/FluencyContext.d.ts +11 -0
  188. package/dist/typescript/commonjs/features/fluency/context/FluencyContext.d.ts.map +1 -0
  189. package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts +25 -0
  190. package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts.map +1 -0
  191. package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts +19 -0
  192. package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts.map +1 -0
  193. package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts +46 -0
  194. package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts.map +1 -0
  195. package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts +7 -0
  196. package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -0
  197. package/dist/typescript/commonjs/features/fluency/index.d.ts +7 -0
  198. package/dist/typescript/commonjs/features/fluency/index.d.ts.map +1 -0
  199. package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts +6 -0
  200. package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts.map +1 -0
  201. package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts +3 -0
  202. package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -0
  203. package/dist/typescript/commonjs/features/fluency/model/FluencyInputModel.d.ts +12 -0
  204. package/dist/typescript/commonjs/features/fluency/model/FluencyInputModel.d.ts.map +1 -0
  205. package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts +3 -0
  206. package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -0
  207. package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts +21 -0
  208. package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts.map +1 -0
  209. package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts +3 -0
  210. package/dist/typescript/commonjs/features/fluency/model/FluencySolvingModel.d.ts.map +1 -0
  211. package/dist/typescript/commonjs/index.d.ts +1 -0
  212. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  213. package/dist/typescript/module/features/fluency/__tests__/FluencyModel.test.d.ts +2 -0
  214. package/dist/typescript/module/features/fluency/__tests__/FluencyModel.test.d.ts.map +1 -0
  215. package/dist/typescript/module/features/fluency/assets/DivideIcon.d.ts +8 -0
  216. package/dist/typescript/module/features/fluency/assets/DivideIcon.d.ts.map +1 -0
  217. package/dist/typescript/module/features/fluency/assets/SpringIcon.d.ts +3 -0
  218. package/dist/typescript/module/features/fluency/assets/SpringIcon.d.ts.map +1 -0
  219. package/dist/typescript/module/features/fluency/assets/StarFillIcon.d.ts +3 -0
  220. package/dist/typescript/module/features/fluency/assets/StarFillIcon.d.ts.map +1 -0
  221. package/dist/typescript/module/features/fluency/components/Fluency.d.ts +13 -0
  222. package/dist/typescript/module/features/fluency/components/Fluency.d.ts.map +1 -0
  223. package/dist/typescript/module/features/fluency/components/FluencySolving.d.ts +9 -0
  224. package/dist/typescript/module/features/fluency/components/FluencySolving.d.ts.map +1 -0
  225. package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts +11 -0
  226. package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -0
  227. package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts +3 -0
  228. package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -0
  229. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts +12 -0
  230. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyEquationCard.d.ts.map +1 -0
  231. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyNumpad.d.ts +3 -0
  232. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencyNumpad.d.ts.map +1 -0
  233. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts +3 -0
  234. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingCard.d.ts.map +1 -0
  235. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts +7 -0
  236. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingHeader.d.ts.map +1 -0
  237. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts +8 -0
  238. package/dist/typescript/module/features/fluency/components/fluency-solving/FluencySolvingProgress.d.ts.map +1 -0
  239. package/dist/typescript/module/features/fluency/components/matrix/FluencyMatrix.d.ts +3 -0
  240. package/dist/typescript/module/features/fluency/components/matrix/FluencyMatrix.d.ts.map +1 -0
  241. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts +11 -0
  242. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixCell.d.ts.map +1 -0
  243. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixFill.d.ts +3 -0
  244. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -0
  245. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixLegend.d.ts +5 -0
  246. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixLegend.d.ts.map +1 -0
  247. package/dist/typescript/module/features/fluency/components/select-math-operator/MathOperatorRow.d.ts +13 -0
  248. package/dist/typescript/module/features/fluency/components/select-math-operator/MathOperatorRow.d.ts.map +1 -0
  249. package/dist/typescript/module/features/fluency/components/select-math-operator/ProgressBar.d.ts +8 -0
  250. package/dist/typescript/module/features/fluency/components/select-math-operator/ProgressBar.d.ts.map +1 -0
  251. package/dist/typescript/module/features/fluency/components/select-math-operator/SelectMathOperator.d.ts +3 -0
  252. package/dist/typescript/module/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -0
  253. package/dist/typescript/module/features/fluency/components/start-banner/BannerFlashcards.d.ts +11 -0
  254. package/dist/typescript/module/features/fluency/components/start-banner/BannerFlashcards.d.ts.map +1 -0
  255. package/dist/typescript/module/features/fluency/components/start-banner/MathFlashcard.d.ts +28 -0
  256. package/dist/typescript/module/features/fluency/components/start-banner/MathFlashcard.d.ts.map +1 -0
  257. package/dist/typescript/module/features/fluency/components/start-banner/StartBanner.d.ts +3 -0
  258. package/dist/typescript/module/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -0
  259. package/dist/typescript/module/features/fluency/context/FluencyContext.d.ts +11 -0
  260. package/dist/typescript/module/features/fluency/context/FluencyContext.d.ts.map +1 -0
  261. package/dist/typescript/module/features/fluency/fluency.constants.d.ts +25 -0
  262. package/dist/typescript/module/features/fluency/fluency.constants.d.ts.map +1 -0
  263. package/dist/typescript/module/features/fluency/fluency.helpers.d.ts +19 -0
  264. package/dist/typescript/module/features/fluency/fluency.helpers.d.ts.map +1 -0
  265. package/dist/typescript/module/features/fluency/fluency.types.d.ts +46 -0
  266. package/dist/typescript/module/features/fluency/fluency.types.d.ts.map +1 -0
  267. package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts +7 -0
  268. package/dist/typescript/module/features/fluency/hooks/useFluencyModePreset.d.ts.map +1 -0
  269. package/dist/typescript/module/features/fluency/index.d.ts +7 -0
  270. package/dist/typescript/module/features/fluency/index.d.ts.map +1 -0
  271. package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts +6 -0
  272. package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts.map +1 -0
  273. package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts +3 -0
  274. package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -0
  275. package/dist/typescript/module/features/fluency/model/FluencyInputModel.d.ts +12 -0
  276. package/dist/typescript/module/features/fluency/model/FluencyInputModel.d.ts.map +1 -0
  277. package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts +3 -0
  278. package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -0
  279. package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts +21 -0
  280. package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts.map +1 -0
  281. package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts +3 -0
  282. package/dist/typescript/module/features/fluency/model/FluencySolvingModel.d.ts.map +1 -0
  283. package/dist/typescript/module/index.d.ts +1 -0
  284. package/dist/typescript/module/index.d.ts.map +1 -1
  285. package/package.json +1 -1
  286. package/src/features/fluency/__tests__/FluencyModel.test.ts +28 -0
  287. package/src/features/fluency/assets/DivideIcon.tsx +21 -0
  288. package/src/features/fluency/assets/SpringIcon.tsx +17 -0
  289. package/src/features/fluency/assets/StarFillIcon.tsx +16 -0
  290. package/src/features/fluency/components/Fluency.tsx +101 -0
  291. package/src/features/fluency/components/FluencySolving.tsx +32 -0
  292. package/src/features/fluency/components/day-streak-counter/DayStreak.tsx +82 -0
  293. package/src/features/fluency/components/day-streak-counter/DayStreakCounter.tsx +68 -0
  294. package/src/features/fluency/components/fluency-solving/FluencyEquationCard.tsx +115 -0
  295. package/src/features/fluency/components/fluency-solving/FluencyNumpad.tsx +150 -0
  296. package/src/features/fluency/components/fluency-solving/FluencySolvingCard.tsx +49 -0
  297. package/src/features/fluency/components/fluency-solving/FluencySolvingHeader.tsx +67 -0
  298. package/src/features/fluency/components/fluency-solving/FluencySolvingProgress.tsx +40 -0
  299. package/src/features/fluency/components/matrix/FluencyMatrix.tsx +29 -0
  300. package/src/features/fluency/components/matrix/components/MatrixCell.tsx +46 -0
  301. package/src/features/fluency/components/matrix/components/MatrixFill.tsx +50 -0
  302. package/src/features/fluency/components/matrix/components/MatrixLegend.tsx +102 -0
  303. package/src/features/fluency/components/select-math-operator/MathOperatorRow.tsx +38 -0
  304. package/src/features/fluency/components/select-math-operator/ProgressBar.tsx +127 -0
  305. package/src/features/fluency/components/select-math-operator/SelectMathOperator.tsx +49 -0
  306. package/src/features/fluency/components/start-banner/BannerFlashcards.tsx +45 -0
  307. package/src/features/fluency/components/start-banner/MathFlashcard.tsx +69 -0
  308. package/src/features/fluency/components/start-banner/StartBanner.tsx +105 -0
  309. package/src/features/fluency/context/FluencyContext.ts +20 -0
  310. package/src/features/fluency/fluency.constants.ts +83 -0
  311. package/src/features/fluency/fluency.helpers.ts +71 -0
  312. package/src/features/fluency/fluency.types.ts +41 -0
  313. package/src/features/fluency/hooks/useFluencyModePreset.ts +24 -0
  314. package/src/features/fluency/index.ts +6 -0
  315. package/src/features/fluency/model/FluencyApiModel.ts +5 -0
  316. package/src/features/fluency/model/FluencyDaysStreakModel.ts +1 -0
  317. package/src/features/fluency/model/FluencyInputModel.ts +21 -0
  318. package/src/features/fluency/model/FluencyMatrixModel.ts +1 -0
  319. package/src/features/fluency/model/FluencyModel.ts +30 -0
  320. package/src/features/fluency/model/FluencySolvingModel.ts +1 -0
  321. package/src/i18n/.generated/schema.json +23 -0
  322. package/src/index.ts +1 -0
@@ -0,0 +1,67 @@
1
+ import React from 'react'
2
+ import { View, StyleSheet } from 'react-native'
3
+ import {
4
+ BORDER_RADIUS,
5
+ Button,
6
+ ButtonSize,
7
+ ButtonVariant,
8
+ COLORS,
9
+ HeadingVariants,
10
+ SHADOWS,
11
+ SPACING,
12
+ Typography,
13
+ } from '@magmamath/react-native-ui'
14
+ import { useText } from '../../../../i18n/i18n'
15
+ import { useFluencyModePreset } from '../../hooks/useFluencyModePreset'
16
+ import { XCloseIcon } from '../../../../shared/icons/XCloseIcon'
17
+
18
+ type FluencySolvingHeaderProps = {
19
+ onClosePress?: () => void
20
+ }
21
+
22
+ export const FluencySolvingHeader = ({ onClosePress }: FluencySolvingHeaderProps) => {
23
+ const t = useText()
24
+ const { matrix, header, icon: OperatorIcon } = useFluencyModePreset()
25
+ const accentColor = header.streakColor.todayBorder
26
+
27
+ return (
28
+ <View style={styles.container}>
29
+ <Button
30
+ variant={ButtonVariant.SECONDARY}
31
+ size={ButtonSize.LARGE}
32
+ icon={<XCloseIcon />}
33
+ onPress={onClosePress}
34
+ />
35
+ <View style={[styles.operatorBadge, { backgroundColor: accentColor }]}>
36
+ <OperatorIcon color={COLORS.NEUTRAL_1} size={16} />
37
+ </View>
38
+ <Typography variant={HeadingVariants.H4} style={styles.title}>
39
+ {t(matrix.operatorName)}
40
+ </Typography>
41
+ </View>
42
+ )
43
+ }
44
+
45
+ const styles = StyleSheet.create({
46
+ container: {
47
+ height: 76,
48
+ flexDirection: 'row',
49
+ alignItems: 'center',
50
+ gap: 14,
51
+ paddingVertical: SPACING[400],
52
+ paddingHorizontal: SPACING[600],
53
+ ...SHADOWS[1],
54
+ },
55
+ operatorBadge: {
56
+ width: 32,
57
+ height: 32,
58
+ borderRadius: BORDER_RADIUS[200],
59
+ alignItems: 'center',
60
+ justifyContent: 'center',
61
+ ...SHADOWS[1],
62
+ },
63
+ title: {
64
+ color: COLORS.NEUTRAL_10,
65
+ fontWeight: '700',
66
+ },
67
+ })
@@ -0,0 +1,40 @@
1
+ import React from 'react'
2
+ import { View, StyleSheet } from 'react-native'
3
+ import { COLORS, SPACING } from '@magmamath/react-native-ui'
4
+
5
+ type FluencySolvingProgressProps = {
6
+ total: number
7
+ activeIndex: number
8
+ }
9
+
10
+ export const FluencySolvingProgress = ({ total, activeIndex }: FluencySolvingProgressProps) => {
11
+ return (
12
+ <View style={styles.container}>
13
+ {Array.from({ length: total }).map((_, index) => (
14
+ <View key={index} style={index === activeIndex ? styles.dotActive : styles.dot} />
15
+ ))}
16
+ </View>
17
+ )
18
+ }
19
+
20
+ const styles = StyleSheet.create({
21
+ container: {
22
+ flexDirection: 'row',
23
+ gap: SPACING[200],
24
+ paddingHorizontal: SPACING[600],
25
+ paddingVertical: 14,
26
+ justifyContent: 'center',
27
+ },
28
+ dot: {
29
+ width: 12,
30
+ height: 12,
31
+ borderRadius: 6,
32
+ backgroundColor: COLORS.NEUTRAL_4,
33
+ },
34
+ dotActive: {
35
+ width: 34,
36
+ height: 12,
37
+ backgroundColor: COLORS.NEUTRAL_10,
38
+ borderRadius: 9999,
39
+ },
40
+ })
@@ -0,0 +1,29 @@
1
+ import React from 'react'
2
+ import { View, StyleSheet } from 'react-native'
3
+ import { BORDER_RADIUS, COLORS, SHADOWS, SPACING } from '@magmamath/react-native-ui'
4
+ import { MatrixLegend } from './components/MatrixLegend'
5
+ import { MatrixFill } from './components/MatrixFill'
6
+
7
+ export const FluencyMatrix = () => (
8
+ <View style={styles.container}>
9
+ <View style={styles.body}>
10
+ <MatrixFill />
11
+ </View>
12
+ <MatrixLegend />
13
+ </View>
14
+ )
15
+
16
+ const styles = StyleSheet.create({
17
+ container: {
18
+ flex: 1,
19
+ backgroundColor: COLORS.NEUTRAL_1,
20
+ borderRadius: BORDER_RADIUS[400],
21
+ overflow: 'hidden',
22
+ ...SHADOWS[1],
23
+ },
24
+ body: {
25
+ flex: 1,
26
+ padding: SPACING[300],
27
+ minHeight: 354,
28
+ },
29
+ })
@@ -0,0 +1,46 @@
1
+ import React from 'react'
2
+ import { View, Text, StyleSheet } from 'react-native'
3
+ import { BORDER_RADIUS, COLORS } from '@magmamath/react-native-ui'
4
+ import {
5
+ getCellBackground,
6
+ getCellColorByScore,
7
+ getCellLabel,
8
+ getMasteryLevel,
9
+ } from '../../../fluency.helpers'
10
+ import { FluencyMasteryLevel } from '../../../fluency.constants'
11
+ import { StarFillIcon } from '../../../assets/StarFillIcon'
12
+ import type { FluencyModePreset } from '../../../fluency.types'
13
+
14
+ type MatrixCellProps = {
15
+ row: number
16
+ col: number
17
+ score: number | null
18
+ mastery: FluencyModePreset['matrix']['mastery']
19
+ }
20
+
21
+ export const MatrixCell = ({ row, col, score, mastery }: MatrixCellProps) => {
22
+ const label = getCellLabel(row, col)
23
+ const isMastered = score !== null && getMasteryLevel(score) === FluencyMasteryLevel.MASTERED
24
+ const background =
25
+ score !== null ? getCellColorByScore(score, mastery) : getCellBackground(row, col)
26
+
27
+ return (
28
+ <View style={[styles.cell, { backgroundColor: background }]}>
29
+ {isMastered && <StarFillIcon />}
30
+ {label !== null && <Text style={styles.headerText}>{label}</Text>}
31
+ </View>
32
+ )
33
+ }
34
+
35
+ const styles = StyleSheet.create({
36
+ cell: {
37
+ flex: 1,
38
+ borderRadius: BORDER_RADIUS[100],
39
+ alignItems: 'center',
40
+ justifyContent: 'center',
41
+ },
42
+ headerText: {
43
+ fontSize: 13,
44
+ color: COLORS.NEUTRAL_2,
45
+ },
46
+ })
@@ -0,0 +1,50 @@
1
+ import React from 'react'
2
+ import { View, StyleSheet } from 'react-native'
3
+ import { SPACING } from '@magmamath/react-native-ui'
4
+ import { MatrixCell } from './MatrixCell'
5
+ import { MATRIX_SIZE } from '../../../fluency.constants'
6
+ import { useFluencyModePreset } from '../../../hooks/useFluencyModePreset'
7
+
8
+ const MOCK_SCORES: Record<string, number> = {
9
+ '1-1': 90,
10
+ '2-3': 70,
11
+ '3-5': 50,
12
+ '5-2': 30,
13
+ '4-4': 10,
14
+ '1-5': 85,
15
+ '3-3': 45,
16
+ }
17
+
18
+ export const MatrixFill = () => {
19
+ const { matrix } = useFluencyModePreset()
20
+
21
+ return (
22
+ <View style={styles.grid}>
23
+ {Array.from({ length: MATRIX_SIZE }, (_, row) => (
24
+ <View key={row} style={styles.row}>
25
+ {Array.from({ length: MATRIX_SIZE }, (_, col) => (
26
+ <MatrixCell
27
+ key={col}
28
+ row={row}
29
+ col={col}
30
+ score={MOCK_SCORES[`${row}-${col}`] ?? null}
31
+ mastery={matrix.mastery}
32
+ />
33
+ ))}
34
+ </View>
35
+ ))}
36
+ </View>
37
+ )
38
+ }
39
+
40
+ const styles = StyleSheet.create({
41
+ grid: {
42
+ flex: 1,
43
+ gap: SPACING[50],
44
+ },
45
+ row: {
46
+ flex: 1,
47
+ flexDirection: 'row',
48
+ gap: SPACING[50],
49
+ },
50
+ })
@@ -0,0 +1,102 @@
1
+ import React from 'react'
2
+ import { View, Text, StyleSheet } from 'react-native'
3
+ import {
4
+ BORDER_RADIUS,
5
+ Button,
6
+ ButtonSize,
7
+ ButtonVariant,
8
+ COLORS,
9
+ PlayIcon,
10
+ SHADOWS,
11
+ SPACING,
12
+ } from '@magmamath/react-native-ui'
13
+ import { useFluencyModePreset } from '../../../hooks/useFluencyModePreset'
14
+ import { useFluency } from '../../../context/FluencyContext'
15
+ import { useText } from '../../../../../i18n/i18n'
16
+
17
+ const LEGEND_DOT_SIZE = 14
18
+ const LEGEND_DOT_BORDER_RADIUS = 3
19
+ const LEGEND_LABEL_FONT_SIZE = 12
20
+
21
+ type MatrixLegendProps = {}
22
+
23
+ export const MatrixLegend = ({}: MatrixLegendProps) => {
24
+ const t = useText()
25
+ const { matrix, buttonColor, legendItems } = useFluencyModePreset()
26
+ const { onPracticePress } = useFluency()
27
+
28
+ return (
29
+ <View style={styles.container}>
30
+ <View style={styles.legendItems}>
31
+ {legendItems.map((item) => (
32
+ <View key={item.label} style={styles.legendItem}>
33
+ <View
34
+ style={[
35
+ styles.legendDot,
36
+ { backgroundColor: item.color },
37
+ item.withBorder && styles.legendDotBorder,
38
+ ]}
39
+ />
40
+ <Text style={styles.legendLabel}>{item.label}</Text>
41
+ </View>
42
+ ))}
43
+ </View>
44
+ <Button
45
+ onPress={onPracticePress}
46
+ variant={ButtonVariant.PRIMARY}
47
+ size={ButtonSize.MEDIUM}
48
+ colorScheme={buttonColor}
49
+ icon={<PlayIcon color={COLORS.NEUTRAL_1} />}
50
+ raiseLevel={3}
51
+ style={{ container: styles.practiceButton, text: styles.practiceButtonText }}
52
+ >
53
+ {`${t('student.fluency.practice')} ${t(matrix.operatorName)}`}
54
+ </Button>
55
+ </View>
56
+ )
57
+ }
58
+
59
+ const styles = StyleSheet.create({
60
+ container: {
61
+ height: 65,
62
+ flexDirection: 'row',
63
+ alignItems: 'flex-end',
64
+ justifyContent: 'space-between',
65
+ backgroundColor: COLORS.NEUTRAL_2,
66
+ borderBottomColor: COLORS.NEUTRAL_5,
67
+ paddingHorizontal: SPACING[300],
68
+ paddingVertical: SPACING[300],
69
+ borderTopLeftRadius: BORDER_RADIUS[400],
70
+ borderTopRightRadius: BORDER_RADIUS[400],
71
+ ...SHADOWS[1],
72
+ },
73
+ legendItems: {
74
+ flexDirection: 'row',
75
+ alignItems: 'center',
76
+ gap: SPACING[400],
77
+ },
78
+ legendItem: {
79
+ flexDirection: 'row',
80
+ alignItems: 'center',
81
+ gap: SPACING[150],
82
+ },
83
+ legendDot: {
84
+ width: LEGEND_DOT_SIZE,
85
+ height: LEGEND_DOT_SIZE,
86
+ borderRadius: LEGEND_DOT_BORDER_RADIUS,
87
+ },
88
+ legendDotBorder: {
89
+ borderWidth: 0.5,
90
+ borderColor: COLORS.NEUTRAL_5,
91
+ },
92
+ legendLabel: {
93
+ fontSize: LEGEND_LABEL_FONT_SIZE,
94
+ color: COLORS.NEUTRAL_7,
95
+ },
96
+ practiceButton: {
97
+ alignSelf: 'center',
98
+ },
99
+ practiceButtonText: {
100
+ textTransform: 'uppercase',
101
+ },
102
+ })
@@ -0,0 +1,38 @@
1
+ import React, { ReactNode } from 'react'
2
+ import { StyleSheet, View } from 'react-native'
3
+ import { COLORS, SelectOption, SelectOptionColor, SPACING } from '@magmamath/react-native-ui'
4
+ import { ProgressBar } from './ProgressBar'
5
+
6
+ export type MathOperatorRowProps = {
7
+ title: string
8
+ icon: ReactNode
9
+ progress: number
10
+ color: SelectOptionColor
11
+ selected: boolean
12
+ onSelect: () => void
13
+ showDivider?: boolean
14
+ }
15
+
16
+ export const MathOperatorRow = ({
17
+ title,
18
+ icon,
19
+ progress,
20
+ color,
21
+ selected,
22
+ onSelect,
23
+ showDivider = true,
24
+ }: MathOperatorRowProps) => (
25
+ <View>
26
+ <SelectOption title={title} icon={icon} color={color} selected={selected} onPress={onSelect} />
27
+ <ProgressBar progress={progress} color={color} />
28
+ {showDivider && <View style={styles.divider} />}
29
+ </View>
30
+ )
31
+
32
+ const styles = StyleSheet.create({
33
+ divider: {
34
+ height: 1,
35
+ backgroundColor: COLORS.NEUTRAL_3,
36
+ marginVertical: SPACING[600],
37
+ },
38
+ })
@@ -0,0 +1,127 @@
1
+ import React from 'react'
2
+ import { StyleSheet, View } from 'react-native'
3
+ import {
4
+ BORDER_RADIUS,
5
+ COLORS,
6
+ HeadingVariants,
7
+ SelectOptionColor,
8
+ SPACING,
9
+ Typography,
10
+ } from '@magmamath/react-native-ui'
11
+
12
+ type ProgressShades = {
13
+ low: string
14
+ medium: string
15
+ high: string
16
+ max: string
17
+ }
18
+
19
+ const PROGRESS_COLOR_SHADES: Record<SelectOptionColor, ProgressShades> = {
20
+ [SelectOptionColor.GREEN]: {
21
+ low: COLORS.GREEN_2,
22
+ medium: COLORS.GREEN_3,
23
+ high: COLORS.GREEN_6,
24
+ max: COLORS.GREEN_7,
25
+ },
26
+ [SelectOptionColor.ORANGE]: {
27
+ low: COLORS.ORANGE_2,
28
+ medium: COLORS.ORANGE_3,
29
+ high: COLORS.ORANGE_6,
30
+ max: COLORS.ORANGE_7,
31
+ },
32
+ [SelectOptionColor.BLUE]: {
33
+ low: COLORS.BLUE_2,
34
+ medium: COLORS.BLUE_3,
35
+ high: COLORS.BLUE_6,
36
+ max: COLORS.BLUE_7,
37
+ },
38
+ [SelectOptionColor.RED]: {
39
+ low: COLORS.RED_2,
40
+ medium: COLORS.RED_3,
41
+ high: COLORS.RED_6,
42
+ max: COLORS.RED_7,
43
+ },
44
+ [SelectOptionColor.YELLOW]: {
45
+ low: COLORS.YELLOW_2,
46
+ medium: COLORS.YELLOW_3,
47
+ high: COLORS.YELLOW_6,
48
+ max: COLORS.YELLOW_7,
49
+ },
50
+ [SelectOptionColor.PURPLE]: {
51
+ low: COLORS.PURPLE_2,
52
+ medium: COLORS.PURPLE_3,
53
+ high: COLORS.PURPLE_6,
54
+ max: COLORS.PURPLE_7,
55
+ },
56
+ [SelectOptionColor.GREY]: {
57
+ low: COLORS.NEUTRAL_2,
58
+ medium: COLORS.NEUTRAL_3,
59
+ high: COLORS.NEUTRAL_6,
60
+ max: COLORS.NEUTRAL_7,
61
+ },
62
+ [SelectOptionColor.SUNSET]: {
63
+ low: COLORS.RED_2,
64
+ medium: COLORS.RED_3,
65
+ high: COLORS.RED_6,
66
+ max: COLORS.RED_7,
67
+ },
68
+ }
69
+
70
+ const PRIMARY_COLOR_MAP: Record<SelectOptionColor, string> = {
71
+ [SelectOptionColor.GREEN]: COLORS.PRIMARY_GREEN,
72
+ [SelectOptionColor.ORANGE]: COLORS.PRIMARY_ORANGE,
73
+ [SelectOptionColor.BLUE]: COLORS.PRIMARY_BLUE,
74
+ [SelectOptionColor.RED]: COLORS.PRIMARY_RED,
75
+ [SelectOptionColor.YELLOW]: COLORS.PRIMARY_YELLOW,
76
+ [SelectOptionColor.PURPLE]: COLORS.PRIMARY_PURPLE,
77
+ [SelectOptionColor.GREY]: COLORS.NEUTRAL_6,
78
+ [SelectOptionColor.SUNSET]: COLORS.PRIMARY_RED,
79
+ }
80
+
81
+ const getFillColor = (shades: ProgressShades, progress: number): string => {
82
+ if (progress <= 10) return shades.low
83
+ if (progress <= 20) return shades.medium
84
+ if (progress <= 80) return shades.high
85
+ return shades.max
86
+ }
87
+
88
+ export type ProgressBarProps = {
89
+ progress: number
90
+ color: SelectOptionColor
91
+ }
92
+
93
+ export const ProgressBar = ({ progress, color = SelectOptionColor.GREEN }: ProgressBarProps) => {
94
+ const normalized = Math.round(Math.min(100, Math.max(0, progress)))
95
+ const fillColor = getFillColor(PROGRESS_COLOR_SHADES[color], normalized)
96
+ const textColor = PRIMARY_COLOR_MAP[color]
97
+ return (
98
+ <View style={styles.container}>
99
+ <View style={styles.track}>
100
+ <View style={[styles.fill, { backgroundColor: fillColor, width: `${normalized}%` }]} />
101
+ </View>
102
+ <Typography variant={HeadingVariants.H10} style={{ color: textColor }}>
103
+ {normalized}%
104
+ </Typography>
105
+ </View>
106
+ )
107
+ }
108
+
109
+ const styles = StyleSheet.create({
110
+ container: {
111
+ flexDirection: 'row',
112
+ marginTop: SPACING[200],
113
+ gap: SPACING[200],
114
+ alignItems: 'center',
115
+ },
116
+ track: {
117
+ flex: 1,
118
+ height: 18,
119
+ backgroundColor: COLORS.NEUTRAL_3,
120
+ borderRadius: BORDER_RADIUS[450],
121
+ overflow: 'hidden',
122
+ },
123
+ fill: {
124
+ height: '100%',
125
+ borderRadius: BORDER_RADIUS[450],
126
+ },
127
+ })
@@ -0,0 +1,49 @@
1
+ import React from 'react'
2
+ import { StyleSheet, View } from 'react-native'
3
+ import { BORDER_RADIUS, COLORS, SHADOWS, SPACING } from '@magmamath/react-native-ui'
4
+ import { useUnit } from 'effector-react'
5
+ import { FLUENCY_MODES } from '../../fluency.constants'
6
+ import { MathOperatorRow } from './MathOperatorRow'
7
+ import { useFluency } from '../../context/FluencyContext'
8
+ import { useText } from '../../../../i18n/i18n'
9
+
10
+ export const SelectMathOperator = () => {
11
+ const t = useText()
12
+ const { model, onModeSelectPress } = useFluency()
13
+ const fluencyMode = useUnit(model.$mode)
14
+
15
+ return (
16
+ <View style={styles.container}>
17
+ {FLUENCY_MODES.map(({ mode, label, icon: Icon, select }, index) => {
18
+ const isSelectedMode = mode === fluencyMode
19
+ return (
20
+ <MathOperatorRow
21
+ key={mode}
22
+ title={t(label)}
23
+ icon={<Icon color={isSelectedMode ? COLORS.NEUTRAL_1 : undefined} />}
24
+ // progress={0}
25
+ progress={Math.random() * 100}
26
+ color={select}
27
+ selected={isSelectedMode}
28
+ onSelect={() => {
29
+ model.setMode(mode)
30
+ onModeSelectPress?.(mode)
31
+ }}
32
+ showDivider={index < FLUENCY_MODES.length - 1}
33
+ />
34
+ )
35
+ })}
36
+ </View>
37
+ )
38
+ }
39
+
40
+ const styles = StyleSheet.create({
41
+ container: {
42
+ width: 270,
43
+ paddingVertical: SPACING[400],
44
+ paddingHorizontal: SPACING[200],
45
+ borderRadius: BORDER_RADIUS[400],
46
+ backgroundColor: COLORS.NEUTRAL_1,
47
+ ...SHADOWS[1],
48
+ },
49
+ })
@@ -0,0 +1,45 @@
1
+ import React from 'react'
2
+ import { MathFlashcard, FlashcardLayout } from './MathFlashcard'
3
+
4
+ export type FlashcardExample = {
5
+ left: string
6
+ right: string
7
+ }
8
+
9
+ const CARD_LAYOUTS: FlashcardLayout[] = [
10
+ {
11
+ card: { width: 146, height: 88, radius: 6 },
12
+ answer: { width: 20, height: 29, radius: 4 },
13
+ fontSize: 26,
14
+ position: { right: 283, top: 31, zIndex: 1 },
15
+ rotation: '21.3deg',
16
+ },
17
+ {
18
+ card: { width: 195, height: 118, radius: 9 },
19
+ answer: { width: 27, height: 38, radius: 6 },
20
+ fontSize: 35,
21
+ position: { right: 148, top: -6, zIndex: 2 },
22
+ rotation: '-15.43deg',
23
+ },
24
+ {
25
+ card: { width: 260, height: 157, radius: 12 },
26
+ answer: { width: 36, height: 51, radius: 8 },
27
+ fontSize: 46,
28
+ position: { right: 0, top: -11, zIndex: 3 },
29
+ rotation: '8.83deg',
30
+ },
31
+ ]
32
+
33
+ type BannerFlashcardsProps = {
34
+ examples: FlashcardExample[]
35
+ }
36
+
37
+ export const BannerFlashcards = ({ examples }: BannerFlashcardsProps) => (
38
+ <>
39
+ {CARD_LAYOUTS.map((layout, index) => {
40
+ const example = examples[index]
41
+ if (!example) return null
42
+ return <MathFlashcard key={index} left={example.left} right={example.right} layout={layout} />
43
+ })}
44
+ </>
45
+ )
@@ -0,0 +1,69 @@
1
+ import React from 'react'
2
+ import { View, Text, StyleSheet } from 'react-native'
3
+ import { COLORS, SHADOWS } from '@magmamath/react-native-ui'
4
+
5
+ export type FlashcardLayout = {
6
+ card: { width: number; height: number; radius: number }
7
+ answer: { width: number; height: number; radius: number }
8
+ fontSize: number
9
+ position: { right: number; top: number; zIndex: number }
10
+ rotation: string
11
+ }
12
+
13
+ type MathFlashcardProps = {
14
+ left: string
15
+ right: string
16
+ layout: FlashcardLayout
17
+ }
18
+
19
+ export const MathFlashcard = ({ left, right, layout }: MathFlashcardProps) => (
20
+ <View
21
+ style={[
22
+ styles.card,
23
+ {
24
+ width: layout.card.width,
25
+ height: layout.card.height,
26
+ borderRadius: layout.card.radius,
27
+ right: layout.position.right,
28
+ top: layout.position.top,
29
+ zIndex: layout.position.zIndex,
30
+ transform: [{ rotate: layout.rotation }],
31
+ },
32
+ ]}
33
+ >
34
+ <View style={styles.row}>
35
+ <Text style={[styles.text, { fontSize: layout.fontSize }]}>{left}</Text>
36
+ <View
37
+ style={[
38
+ styles.answerBox,
39
+ { width: layout.answer.width, height: layout.answer.height, borderRadius: layout.answer.radius },
40
+ ]}
41
+ />
42
+ <Text style={[styles.text, { fontSize: layout.fontSize }]}>{right}</Text>
43
+ </View>
44
+ </View>
45
+ )
46
+
47
+ const styles = StyleSheet.create({
48
+ card: {
49
+ position: 'absolute',
50
+ backgroundColor: COLORS.NEUTRAL_1,
51
+ alignItems: 'center',
52
+ justifyContent: 'center',
53
+ ...SHADOWS[1],
54
+ },
55
+ row: {
56
+ flexDirection: 'row',
57
+ alignItems: 'center',
58
+ gap: 1,
59
+ },
60
+ text: {
61
+ fontWeight: 'bold',
62
+ color: COLORS.BLACK,
63
+ },
64
+ answerBox: {
65
+ backgroundColor: COLORS.NEUTRAL_2,
66
+ borderWidth: 1,
67
+ borderColor: COLORS.NEUTRAL_5,
68
+ },
69
+ })