@magmamath/students-features 1.3.25 → 1.3.26-rc.0

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 (213) hide show
  1. package/dist/commonjs/features/fluency/components/Fluency.js +63 -0
  2. package/dist/commonjs/features/fluency/components/Fluency.js.map +1 -0
  3. package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js +91 -0
  4. package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -0
  5. package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js +73 -0
  6. package/dist/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -0
  7. package/dist/commonjs/features/fluency/components/matrix/FluencyMatrix.js +35 -0
  8. package/dist/commonjs/features/fluency/components/matrix/FluencyMatrix.js.map +1 -0
  9. package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js +91 -0
  10. package/dist/commonjs/features/fluency/components/matrix/components/MatrixFill.js.map +1 -0
  11. package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js +118 -0
  12. package/dist/commonjs/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -0
  13. package/dist/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.js +43 -0
  14. package/dist/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.js.map +1 -0
  15. package/dist/commonjs/features/fluency/components/select-math-operator/ProgressBar.js +124 -0
  16. package/dist/commonjs/features/fluency/components/select-math-operator/ProgressBar.js.map +1 -0
  17. package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js +75 -0
  18. package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -0
  19. package/dist/commonjs/features/fluency/components/start-banner/BannerFlashcards.js +80 -0
  20. package/dist/commonjs/features/fluency/components/start-banner/BannerFlashcards.js.map +1 -0
  21. package/dist/commonjs/features/fluency/components/start-banner/MathFlashcard.js +73 -0
  22. package/dist/commonjs/features/fluency/components/start-banner/MathFlashcard.js.map +1 -0
  23. package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js +98 -0
  24. package/dist/commonjs/features/fluency/components/start-banner/StartBanner.js.map +1 -0
  25. package/dist/commonjs/features/fluency/fluency.constants.js +77 -0
  26. package/dist/commonjs/features/fluency/fluency.constants.js.map +1 -0
  27. package/dist/commonjs/features/fluency/fluency.helpers.js +9 -0
  28. package/dist/commonjs/features/fluency/fluency.helpers.js.map +1 -0
  29. package/dist/commonjs/features/fluency/fluency.types.js +2 -0
  30. package/dist/commonjs/features/fluency/fluency.types.js.map +1 -0
  31. package/dist/commonjs/features/fluency/hooks/useFluencyModeUIPreset.js +15 -0
  32. package/dist/commonjs/features/fluency/hooks/useFluencyModeUIPreset.js.map +1 -0
  33. package/dist/commonjs/features/fluency/index.js +60 -0
  34. package/dist/commonjs/features/fluency/index.js.map +1 -0
  35. package/dist/commonjs/features/fluency/model/FluencyApiModel.js +11 -0
  36. package/dist/commonjs/features/fluency/model/FluencyApiModel.js.map +1 -0
  37. package/dist/commonjs/features/fluency/model/FluencyDaysStreakModel.js +9 -0
  38. package/dist/commonjs/features/fluency/model/FluencyDaysStreakModel.js.map +1 -0
  39. package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js +9 -0
  40. package/dist/commonjs/features/fluency/model/FluencyMatrixModel.js.map +1 -0
  41. package/dist/commonjs/features/fluency/model/FluencyModel.js +24 -0
  42. package/dist/commonjs/features/fluency/model/FluencyModel.js.map +1 -0
  43. package/dist/commonjs/features/fluency/model/fluency.instance.js +11 -0
  44. package/dist/commonjs/features/fluency/model/fluency.instance.js.map +1 -0
  45. package/dist/commonjs/index.js +12 -0
  46. package/dist/commonjs/index.js.map +1 -1
  47. package/dist/module/features/fluency/components/Fluency.js +57 -0
  48. package/dist/module/features/fluency/components/Fluency.js.map +1 -0
  49. package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js +85 -0
  50. package/dist/module/features/fluency/components/day-streak-counter/DayStreak.js.map +1 -0
  51. package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js +67 -0
  52. package/dist/module/features/fluency/components/day-streak-counter/DayStreakCounter.js.map +1 -0
  53. package/dist/module/features/fluency/components/matrix/FluencyMatrix.js +29 -0
  54. package/dist/module/features/fluency/components/matrix/FluencyMatrix.js.map +1 -0
  55. package/dist/module/features/fluency/components/matrix/components/MatrixFill.js +85 -0
  56. package/dist/module/features/fluency/components/matrix/components/MatrixFill.js.map +1 -0
  57. package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js +112 -0
  58. package/dist/module/features/fluency/components/matrix/components/MatrixLegend.js.map +1 -0
  59. package/dist/module/features/fluency/components/select-math-operator/MathOperatorRow.js +37 -0
  60. package/dist/module/features/fluency/components/select-math-operator/MathOperatorRow.js.map +1 -0
  61. package/dist/module/features/fluency/components/select-math-operator/ProgressBar.js +118 -0
  62. package/dist/module/features/fluency/components/select-math-operator/ProgressBar.js.map +1 -0
  63. package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js +69 -0
  64. package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -0
  65. package/dist/module/features/fluency/components/start-banner/BannerFlashcards.js +74 -0
  66. package/dist/module/features/fluency/components/start-banner/BannerFlashcards.js.map +1 -0
  67. package/dist/module/features/fluency/components/start-banner/MathFlashcard.js +67 -0
  68. package/dist/module/features/fluency/components/start-banner/MathFlashcard.js.map +1 -0
  69. package/dist/module/features/fluency/components/start-banner/StartBanner.js +92 -0
  70. package/dist/module/features/fluency/components/start-banner/StartBanner.js.map +1 -0
  71. package/dist/module/features/fluency/fluency.constants.js +73 -0
  72. package/dist/module/features/fluency/fluency.constants.js.map +1 -0
  73. package/dist/module/features/fluency/fluency.helpers.js +4 -0
  74. package/dist/module/features/fluency/fluency.helpers.js.map +1 -0
  75. package/dist/module/features/fluency/fluency.types.js +2 -0
  76. package/dist/module/features/fluency/fluency.types.js.map +1 -0
  77. package/dist/module/features/fluency/hooks/useFluencyModeUIPreset.js +10 -0
  78. package/dist/module/features/fluency/hooks/useFluencyModeUIPreset.js.map +1 -0
  79. package/dist/module/features/fluency/index.js +8 -0
  80. package/dist/module/features/fluency/index.js.map +1 -0
  81. package/dist/module/features/fluency/model/FluencyApiModel.js +6 -0
  82. package/dist/module/features/fluency/model/FluencyApiModel.js.map +1 -0
  83. package/dist/module/features/fluency/model/FluencyDaysStreakModel.js +4 -0
  84. package/dist/module/features/fluency/model/FluencyDaysStreakModel.js.map +1 -0
  85. package/dist/module/features/fluency/model/FluencyMatrixModel.js +4 -0
  86. package/dist/module/features/fluency/model/FluencyMatrixModel.js.map +1 -0
  87. package/dist/module/features/fluency/model/FluencyModel.js +19 -0
  88. package/dist/module/features/fluency/model/FluencyModel.js.map +1 -0
  89. package/dist/module/features/fluency/model/fluency.instance.js +7 -0
  90. package/dist/module/features/fluency/model/fluency.instance.js.map +1 -0
  91. package/dist/module/index.js +1 -0
  92. package/dist/module/index.js.map +1 -1
  93. package/dist/typescript/commonjs/features/fluency/__tests__/FluencyModel.test.d.ts +2 -0
  94. package/dist/typescript/commonjs/features/fluency/__tests__/FluencyModel.test.d.ts.map +1 -0
  95. package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts +8 -0
  96. package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts.map +1 -0
  97. package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts +11 -0
  98. package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -0
  99. package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts +5 -0
  100. package/dist/typescript/commonjs/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -0
  101. package/dist/typescript/commonjs/features/fluency/components/matrix/FluencyMatrix.d.ts +5 -0
  102. package/dist/typescript/commonjs/features/fluency/components/matrix/FluencyMatrix.d.ts.map +1 -0
  103. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixFill.d.ts +5 -0
  104. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -0
  105. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixLegend.d.ts +5 -0
  106. package/dist/typescript/commonjs/features/fluency/components/matrix/components/MatrixLegend.d.ts.map +1 -0
  107. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.d.ts +13 -0
  108. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/MathOperatorRow.d.ts.map +1 -0
  109. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/ProgressBar.d.ts +8 -0
  110. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/ProgressBar.d.ts.map +1 -0
  111. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.d.ts +5 -0
  112. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -0
  113. package/dist/typescript/commonjs/features/fluency/components/start-banner/BannerFlashcards.d.ts +11 -0
  114. package/dist/typescript/commonjs/features/fluency/components/start-banner/BannerFlashcards.d.ts.map +1 -0
  115. package/dist/typescript/commonjs/features/fluency/components/start-banner/MathFlashcard.d.ts +28 -0
  116. package/dist/typescript/commonjs/features/fluency/components/start-banner/MathFlashcard.d.ts.map +1 -0
  117. package/dist/typescript/commonjs/features/fluency/components/start-banner/StartBanner.d.ts +5 -0
  118. package/dist/typescript/commonjs/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -0
  119. package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts +24 -0
  120. package/dist/typescript/commonjs/features/fluency/fluency.constants.d.ts.map +1 -0
  121. package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts +2 -0
  122. package/dist/typescript/commonjs/features/fluency/fluency.helpers.d.ts.map +1 -0
  123. package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts +2 -0
  124. package/dist/typescript/commonjs/features/fluency/fluency.types.d.ts.map +1 -0
  125. package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModeUIPreset.d.ts +3 -0
  126. package/dist/typescript/commonjs/features/fluency/hooks/useFluencyModeUIPreset.d.ts.map +1 -0
  127. package/dist/typescript/commonjs/features/fluency/index.d.ts +6 -0
  128. package/dist/typescript/commonjs/features/fluency/index.d.ts.map +1 -0
  129. package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts +6 -0
  130. package/dist/typescript/commonjs/features/fluency/model/FluencyApiModel.d.ts.map +1 -0
  131. package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts +3 -0
  132. package/dist/typescript/commonjs/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -0
  133. package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts +3 -0
  134. package/dist/typescript/commonjs/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -0
  135. package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts +17 -0
  136. package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts.map +1 -0
  137. package/dist/typescript/commonjs/features/fluency/model/fluency.instance.d.ts +3 -0
  138. package/dist/typescript/commonjs/features/fluency/model/fluency.instance.d.ts.map +1 -0
  139. package/dist/typescript/commonjs/index.d.ts +1 -0
  140. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  141. package/dist/typescript/module/features/fluency/__tests__/FluencyModel.test.d.ts +2 -0
  142. package/dist/typescript/module/features/fluency/__tests__/FluencyModel.test.d.ts.map +1 -0
  143. package/dist/typescript/module/features/fluency/components/Fluency.d.ts +8 -0
  144. package/dist/typescript/module/features/fluency/components/Fluency.d.ts.map +1 -0
  145. package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts +11 -0
  146. package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreak.d.ts.map +1 -0
  147. package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts +5 -0
  148. package/dist/typescript/module/features/fluency/components/day-streak-counter/DayStreakCounter.d.ts.map +1 -0
  149. package/dist/typescript/module/features/fluency/components/matrix/FluencyMatrix.d.ts +5 -0
  150. package/dist/typescript/module/features/fluency/components/matrix/FluencyMatrix.d.ts.map +1 -0
  151. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixFill.d.ts +5 -0
  152. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixFill.d.ts.map +1 -0
  153. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixLegend.d.ts +5 -0
  154. package/dist/typescript/module/features/fluency/components/matrix/components/MatrixLegend.d.ts.map +1 -0
  155. package/dist/typescript/module/features/fluency/components/select-math-operator/MathOperatorRow.d.ts +13 -0
  156. package/dist/typescript/module/features/fluency/components/select-math-operator/MathOperatorRow.d.ts.map +1 -0
  157. package/dist/typescript/module/features/fluency/components/select-math-operator/ProgressBar.d.ts +8 -0
  158. package/dist/typescript/module/features/fluency/components/select-math-operator/ProgressBar.d.ts.map +1 -0
  159. package/dist/typescript/module/features/fluency/components/select-math-operator/SelectMathOperator.d.ts +5 -0
  160. package/dist/typescript/module/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -0
  161. package/dist/typescript/module/features/fluency/components/start-banner/BannerFlashcards.d.ts +11 -0
  162. package/dist/typescript/module/features/fluency/components/start-banner/BannerFlashcards.d.ts.map +1 -0
  163. package/dist/typescript/module/features/fluency/components/start-banner/MathFlashcard.d.ts +28 -0
  164. package/dist/typescript/module/features/fluency/components/start-banner/MathFlashcard.d.ts.map +1 -0
  165. package/dist/typescript/module/features/fluency/components/start-banner/StartBanner.d.ts +5 -0
  166. package/dist/typescript/module/features/fluency/components/start-banner/StartBanner.d.ts.map +1 -0
  167. package/dist/typescript/module/features/fluency/fluency.constants.d.ts +24 -0
  168. package/dist/typescript/module/features/fluency/fluency.constants.d.ts.map +1 -0
  169. package/dist/typescript/module/features/fluency/fluency.helpers.d.ts +2 -0
  170. package/dist/typescript/module/features/fluency/fluency.helpers.d.ts.map +1 -0
  171. package/dist/typescript/module/features/fluency/fluency.types.d.ts +2 -0
  172. package/dist/typescript/module/features/fluency/fluency.types.d.ts.map +1 -0
  173. package/dist/typescript/module/features/fluency/hooks/useFluencyModeUIPreset.d.ts +3 -0
  174. package/dist/typescript/module/features/fluency/hooks/useFluencyModeUIPreset.d.ts.map +1 -0
  175. package/dist/typescript/module/features/fluency/index.d.ts +6 -0
  176. package/dist/typescript/module/features/fluency/index.d.ts.map +1 -0
  177. package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts +6 -0
  178. package/dist/typescript/module/features/fluency/model/FluencyApiModel.d.ts.map +1 -0
  179. package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts +3 -0
  180. package/dist/typescript/module/features/fluency/model/FluencyDaysStreakModel.d.ts.map +1 -0
  181. package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts +3 -0
  182. package/dist/typescript/module/features/fluency/model/FluencyMatrixModel.d.ts.map +1 -0
  183. package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts +17 -0
  184. package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts.map +1 -0
  185. package/dist/typescript/module/features/fluency/model/fluency.instance.d.ts +3 -0
  186. package/dist/typescript/module/features/fluency/model/fluency.instance.d.ts.map +1 -0
  187. package/dist/typescript/module/index.d.ts +1 -0
  188. package/dist/typescript/module/index.d.ts.map +1 -1
  189. package/package.json +1 -1
  190. package/src/features/fluency/__tests__/FluencyModel.test.ts +28 -0
  191. package/src/features/fluency/components/Fluency.tsx +59 -0
  192. package/src/features/fluency/components/day-streak-counter/DayStreak.tsx +82 -0
  193. package/src/features/fluency/components/day-streak-counter/DayStreakCounter.tsx +51 -0
  194. package/src/features/fluency/components/matrix/FluencyMatrix.tsx +30 -0
  195. package/src/features/fluency/components/matrix/components/MatrixFill.tsx +86 -0
  196. package/src/features/fluency/components/matrix/components/MatrixLegend.tsx +112 -0
  197. package/src/features/fluency/components/select-math-operator/MathOperatorRow.tsx +38 -0
  198. package/src/features/fluency/components/select-math-operator/ProgressBar.tsx +127 -0
  199. package/src/features/fluency/components/select-math-operator/SelectMathOperator.tsx +90 -0
  200. package/src/features/fluency/components/start-banner/BannerFlashcards.tsx +45 -0
  201. package/src/features/fluency/components/start-banner/MathFlashcard.tsx +69 -0
  202. package/src/features/fluency/components/start-banner/StartBanner.tsx +92 -0
  203. package/src/features/fluency/fluency.constants.ts +75 -0
  204. package/src/features/fluency/fluency.helpers.ts +1 -0
  205. package/src/features/fluency/fluency.types.ts +1 -0
  206. package/src/features/fluency/hooks/useFluencyModeUIPreset.ts +8 -0
  207. package/src/features/fluency/index.ts +5 -0
  208. package/src/features/fluency/model/FluencyApiModel.ts +5 -0
  209. package/src/features/fluency/model/FluencyDaysStreakModel.ts +1 -0
  210. package/src/features/fluency/model/FluencyMatrixModel.ts +1 -0
  211. package/src/features/fluency/model/FluencyModel.ts +24 -0
  212. package/src/features/fluency/model/fluency.instance.ts +3 -0
  213. package/src/index.ts +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FluencyMatrix.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/fluency/components/matrix/FluencyMatrix.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,KAAK,kBAAkB,GAAG,EAAE,CAAA;AAE5B,eAAO,MAAM,aAAa,OAAQ,kBAAkB,sBAOnD,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ type MatrixFillProps = {};
3
+ export declare const MatrixFill: ({}: MatrixFillProps) => React.JSX.Element;
4
+ export {};
5
+ //# sourceMappingURL=MatrixFill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MatrixFill.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/fluency/components/matrix/components/MatrixFill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA+CzB,KAAK,eAAe,GAAG,EAAE,CAAA;AAEzB,eAAO,MAAM,UAAU,OAAQ,eAAe,sBAc7C,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ type MatrixLegendProps = {};
3
+ export declare const MatrixLegend: ({}: MatrixLegendProps) => React.JSX.Element;
4
+ export {};
5
+ //# sourceMappingURL=MatrixLegend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MatrixLegend.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/fluency/components/matrix/components/MatrixLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAuBzB,KAAK,iBAAiB,GAAG,EAAE,CAAA;AAE3B,eAAO,MAAM,YAAY,OAAQ,iBAAiB,sBAyCjD,CAAA"}
@@ -0,0 +1,13 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { SelectOptionColor } from '@magmamath/react-native-ui';
3
+ export type MathOperatorRowProps = {
4
+ title: string;
5
+ icon: ReactNode;
6
+ progress: number;
7
+ color: SelectOptionColor;
8
+ selected: boolean;
9
+ onSelect: () => void;
10
+ showDivider?: boolean;
11
+ };
12
+ export declare const MathOperatorRow: ({ title, icon, progress, color, selected, onSelect, showDivider, }: MathOperatorRowProps) => React.JSX.Element;
13
+ //# sourceMappingURL=MathOperatorRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MathOperatorRow.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/fluency/components/select-math-operator/MathOperatorRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAExC,OAAO,EAAwB,iBAAiB,EAAW,MAAM,4BAA4B,CAAA;AAG7F,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,iBAAiB,CAAA;IACxB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,eAAe,uEAQzB,oBAAoB,sBAMtB,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { SelectOptionColor } from '@magmamath/react-native-ui';
3
+ export type ProgressBarProps = {
4
+ progress: number;
5
+ color: SelectOptionColor;
6
+ };
7
+ export declare const ProgressBar: ({ progress, color }: ProgressBarProps) => React.JSX.Element;
8
+ //# sourceMappingURL=ProgressBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/fluency/components/select-math-operator/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAIL,iBAAiB,EAGlB,MAAM,4BAA4B,CAAA;AA8EnC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,iBAAiB,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,WAAW,wBAAmD,gBAAgB,sBAc1F,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ type SelectMathOperatorProps = {};
3
+ export declare const SelectMathOperator: ({}: SelectMathOperatorProps) => React.JSX.Element;
4
+ export {};
5
+ //# sourceMappingURL=SelectMathOperator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectMathOperator.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/fluency/components/select-math-operator/SelectMathOperator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAyDzB,KAAK,uBAAuB,GAAG,EAAE,CAAA;AAEjC,eAAO,MAAM,kBAAkB,OAAQ,uBAAuB,sBAmB7D,CAAA"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export type FlashcardExample = {
3
+ left: string;
4
+ right: string;
5
+ };
6
+ type BannerFlashcardsProps = {
7
+ examples: FlashcardExample[];
8
+ };
9
+ export declare const BannerFlashcards: ({ examples }: BannerFlashcardsProps) => React.JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=BannerFlashcards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerFlashcards.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/fluency/components/start-banner/BannerFlashcards.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AA0BD,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,gBAAgB,EAAE,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,gBAAgB,iBAAkB,qBAAqB,sBAQnE,CAAA"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ export type FlashcardLayout = {
3
+ card: {
4
+ width: number;
5
+ height: number;
6
+ radius: number;
7
+ };
8
+ answer: {
9
+ width: number;
10
+ height: number;
11
+ radius: number;
12
+ };
13
+ fontSize: number;
14
+ position: {
15
+ right: number;
16
+ top: number;
17
+ zIndex: number;
18
+ };
19
+ rotation: string;
20
+ };
21
+ type MathFlashcardProps = {
22
+ left: string;
23
+ right: string;
24
+ layout: FlashcardLayout;
25
+ };
26
+ export declare const MathFlashcard: ({ left, right, layout }: MathFlashcardProps) => React.JSX.Element;
27
+ export {};
28
+ //# sourceMappingURL=MathFlashcard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MathFlashcard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/fluency/components/start-banner/MathFlashcard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACvD,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACzD,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACxD,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,eAAe,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,aAAa,4BAA6B,kBAAkB,sBA0BxE,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ type StartBannerProps = {};
3
+ export declare const StartBanner: ({}: StartBannerProps) => React.JSX.Element;
4
+ export {};
5
+ //# sourceMappingURL=StartBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StartBanner.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/fluency/components/start-banner/StartBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAgBzB,KAAK,gBAAgB,GAAG,EAAE,CAAA;AAE1B,eAAO,MAAM,WAAW,OAAQ,gBAAgB,sBAkC/C,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { ButtonColor } from '@magmamath/react-native-ui';
2
+ export declare enum FluencyMode {
3
+ ADDITION = "ADDITION",
4
+ SUBTRACTION = "SUBTRACTION",
5
+ MULTIPLICATION = "MULTIPLICATION",
6
+ DIVISION = "DIVISION"
7
+ }
8
+ export type FluencyModePreset = {
9
+ operatorName: string;
10
+ mastery: {
11
+ learning: string;
12
+ developing: string;
13
+ growing: string;
14
+ strong: string;
15
+ mastered: string;
16
+ };
17
+ buttonColor: ButtonColor;
18
+ streakColor: {
19
+ gained: string;
20
+ todayBorder: string;
21
+ };
22
+ };
23
+ export declare const FLUENCY_MODE_PRESETS: Record<FluencyMode, FluencyModePreset>;
24
+ //# sourceMappingURL=fluency.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fluency.constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/fluency/fluency.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAU,MAAM,4BAA4B,CAAA;AAEhE,oBAAY,WAAW;IACrB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAA;QAChB,UAAU,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE;QACX,MAAM,EAAE,MAAM,CAAA;QACd,WAAW,EAAE,MAAM,CAAA;KACpB,CAAA;CACF,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAiDvE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const getFluency: () => void;
2
+ //# sourceMappingURL=fluency.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fluency.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/fluency/fluency.helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,YAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ export type Fluency = {};
2
+ //# sourceMappingURL=fluency.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fluency.types.d.ts","sourceRoot":"","sources":["../../../../../src/features/fluency/fluency.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { FluencyModePreset } from '../fluency.constants';
2
+ export declare const useFluencyModeUIPreset: () => FluencyModePreset;
3
+ //# sourceMappingURL=useFluencyModeUIPreset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFluencyModeUIPreset.d.ts","sourceRoot":"","sources":["../../../../../../src/features/fluency/hooks/useFluencyModeUIPreset.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAG9E,eAAO,MAAM,sBAAsB,QAAO,iBAGzC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './fluency.constants';
2
+ export * from './fluency.types';
3
+ export * from './fluency.helpers';
4
+ export { Fluency } from './components/Fluency';
5
+ export { FluencyModel } from './model/FluencyModel';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/fluency/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA"}
@@ -0,0 +1,6 @@
1
+ type FluencyApiProps = {};
2
+ export declare class FluencyApiModel {
3
+ constructor({}: FluencyApiProps);
4
+ }
5
+ export {};
6
+ //# sourceMappingURL=FluencyApiModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FluencyApiModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/fluency/model/FluencyApiModel.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,EAAE,CAAA;AAEzB,qBAAa,eAAe;gBACd,EAAE,EAAE,eAAe;CAChC"}
@@ -0,0 +1,3 @@
1
+ export declare class FluencyDaysStreakModel {
2
+ }
3
+ //# sourceMappingURL=FluencyDaysStreakModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FluencyDaysStreakModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/fluency/model/FluencyDaysStreakModel.ts"],"names":[],"mappings":"AAAA,qBAAa,sBAAsB;CAAG"}
@@ -0,0 +1,3 @@
1
+ export declare class FluencyMatrixModel {
2
+ }
3
+ //# sourceMappingURL=FluencyMatrixModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FluencyMatrixModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/fluency/model/FluencyMatrixModel.ts"],"names":[],"mappings":"AAAA,qBAAa,kBAAkB;CAAG"}
@@ -0,0 +1,17 @@
1
+ import { FluencyMode } from '../fluency.constants';
2
+ import { FluencyDaysStreakModel } from './FluencyDaysStreakModel';
3
+ import { FluencyMatrixModel } from './FluencyMatrixModel';
4
+ import { FluencyApiModel } from './FluencyApiModel';
5
+ type FluencyModelProps = {
6
+ api: {};
7
+ };
8
+ export declare class FluencyModel {
9
+ readonly api: FluencyApiModel;
10
+ readonly streak: FluencyDaysStreakModel;
11
+ readonly matrix: FluencyMatrixModel;
12
+ readonly setMode: import("effector").EventCallable<FluencyMode>;
13
+ readonly $mode: import("effector").StoreWritable<FluencyMode>;
14
+ constructor({ api }: FluencyModelProps);
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=FluencyModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FluencyModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/fluency/model/FluencyModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,KAAK,iBAAiB,GAAG;IACvB,GAAG,EAAE,EAAE,CAAA;CACR,CAAA;AAED,qBAAa,YAAY;IACvB,SAAgB,GAAG,EAAE,eAAe,CAAA;IACpC,SAAgB,MAAM,EAAE,sBAAsB,CAAA;IAC9C,SAAgB,MAAM,EAAE,kBAAkB,CAAA;IAE1C,SAAgB,OAAO,gDAA6B;IACpD,SAAgB,KAAK,gDAA8C;gBAEvD,EAAE,GAAG,EAAE,EAAE,iBAAiB;CAKvC"}
@@ -0,0 +1,3 @@
1
+ import { FluencyModel } from './FluencyModel';
2
+ export declare const fluencyModel: FluencyModel;
3
+ //# sourceMappingURL=fluency.instance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fluency.instance.d.ts","sourceRoot":"","sources":["../../../../../../src/features/fluency/model/fluency.instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,eAAO,MAAM,YAAY,cAAgC,CAAA"}
@@ -14,4 +14,5 @@ export * from './shared/icons';
14
14
  export * from './features/voice';
15
15
  export * from './features/featureUsage';
16
16
  export * from './features/uiMode';
17
+ export * from './features/fluency';
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmamath/students-features",
3
- "version": "1.3.25",
3
+ "version": "1.3.26-rc.0",
4
4
  "description": "Magmamath features library",
5
5
  "source": "src/index.ts",
6
6
  "main": "src/index.ts",
@@ -0,0 +1,28 @@
1
+ jest.mock('@magmamath/react-native-ui', () => ({
2
+ ButtonColor: {
3
+ GREEN: 'GREEN',
4
+ ORANGE: 'ORANGE',
5
+ BLUE: 'BLUE',
6
+ PURPLE: 'PURPLE',
7
+ },
8
+ COLORS: new Proxy({}, { get: (_: object, key: string) => key }),
9
+ }))
10
+
11
+ import { allSettled, fork } from 'effector'
12
+ import { FluencyModel } from '../model/FluencyModel'
13
+ import { FluencyMode } from '../fluency.constants'
14
+
15
+ describe('FluencyModel.$mode', () => {
16
+ it('defaults to ADDITION', () => {
17
+ const model = new FluencyModel({ api: {} })
18
+ const scope = fork()
19
+ expect(scope.getState(model.$mode)).toBe(FluencyMode.ADDITION)
20
+ })
21
+
22
+ it('updates when setMode is called', async () => {
23
+ const model = new FluencyModel({ api: {} })
24
+ const scope = fork()
25
+ await allSettled(model.setMode, { scope, params: FluencyMode.SUBTRACTION })
26
+ expect(scope.getState(model.$mode)).toBe(FluencyMode.SUBTRACTION)
27
+ })
28
+ })
@@ -0,0 +1,59 @@
1
+ import React from 'react'
2
+ import { View, StyleSheet } from 'react-native'
3
+ import { Typography, HeadingVariants, SPACING, COLORS } from '@magmamath/react-native-ui'
4
+ import { useText } from '../../../i18n/i18n'
5
+ import { StartBanner } from './start-banner/StartBanner'
6
+ import { DayStreakCounter } from './day-streak-counter/DayStreakCounter'
7
+ import { SelectMathOperator } from './select-math-operator/SelectMathOperator'
8
+ import { FluencyMatrix } from './matrix/FluencyMatrix'
9
+ import type { FluencyModel } from '../model/FluencyModel'
10
+
11
+ type FluencyProps = {
12
+ model: FluencyModel
13
+ }
14
+
15
+ export const Fluency = ({ model }: FluencyProps) => {
16
+ const t = useText()
17
+ return (
18
+ <View style={styles.container}>
19
+ <Typography variant={HeadingVariants.H2} style={styles.title}>
20
+ Fluency practice
21
+ </Typography>
22
+
23
+ <View style={styles.header}>
24
+ <StartBanner />
25
+ <DayStreakCounter />
26
+ </View>
27
+
28
+ <View style={styles.matrixContainer}>
29
+ <View style={styles.operatorWrapper}>
30
+ <SelectMathOperator />
31
+ </View>
32
+ <FluencyMatrix />
33
+ </View>
34
+ </View>
35
+ )
36
+ }
37
+
38
+ const MATRIX_LEGEND_HEIGHT = 65
39
+
40
+ const styles = StyleSheet.create({
41
+ container: {},
42
+ title: { color: COLORS.NEUTRAL_9 },
43
+ header: {
44
+ height: 135,
45
+ flexDirection: 'row',
46
+ marginTop: SPACING[400],
47
+ gap: SPACING[400],
48
+ zIndex: 1,
49
+ },
50
+ matrixContainer: {
51
+ flexDirection: 'row',
52
+ marginTop: SPACING[400],
53
+ gap: SPACING[200],
54
+ },
55
+ operatorWrapper: {
56
+ alignSelf: 'flex-start',
57
+ marginTop: MATRIX_LEGEND_HEIGHT,
58
+ },
59
+ })
@@ -0,0 +1,82 @@
1
+ import {
2
+ BORDER_RADIUS,
3
+ COLORS,
4
+ CorrectIcon,
5
+ HeadingVariants,
6
+ SPACING,
7
+ Typography,
8
+ } from '@magmamath/react-native-ui'
9
+ import React from 'react'
10
+ import { StyleSheet, TextStyle, View, ViewStyle } from 'react-native'
11
+ import { FluencyModePreset } from '../../fluency.constants'
12
+
13
+ const CIRCLE_SIZE = SPACING[800]
14
+ const CIRCLE_BORDER_RADIUS = BORDER_RADIUS[400]
15
+
16
+ type StreakStatus = 'missed' | 'gained' | 'today'
17
+
18
+ type StreakDayProps = {
19
+ label: string
20
+ status: StreakStatus
21
+ streakColor: FluencyModePreset['streakColor']
22
+ }
23
+
24
+ type StatusStyle = {
25
+ circle: ViewStyle
26
+ label: TextStyle
27
+ hasIcon: boolean
28
+ }
29
+
30
+ const getStatusStyle = (
31
+ status: StreakStatus,
32
+ streakColor: FluencyModePreset['streakColor']
33
+ ): StatusStyle => {
34
+ if (status === 'gained') {
35
+ return {
36
+ circle: { backgroundColor: streakColor.gained, borderWidth: 1, borderColor: COLORS.NEUTRAL_3 },
37
+ label: { color: streakColor.gained },
38
+ hasIcon: true,
39
+ }
40
+ }
41
+ if (status === 'today') {
42
+ return {
43
+ circle: { backgroundColor: COLORS.NEUTRAL_2, borderWidth: 3, borderColor: streakColor.todayBorder },
44
+ label: { color: streakColor.todayBorder },
45
+ hasIcon: false,
46
+ }
47
+ }
48
+ return {
49
+ circle: { backgroundColor: COLORS.NEUTRAL_2, borderWidth: 1, borderColor: COLORS.NEUTRAL_3 },
50
+ label: { color: COLORS.NEUTRAL_4 },
51
+ hasIcon: false,
52
+ }
53
+ }
54
+
55
+ export const StreakDay = ({ label, status, streakColor }: StreakDayProps) => {
56
+ const { circle, label: labelStyle, hasIcon } = getStatusStyle(status, streakColor)
57
+
58
+ return (
59
+ <View style={styles.container}>
60
+ <View style={[styles.circle, circle]}>
61
+ {hasIcon && <CorrectIcon color={COLORS.NEUTRAL_1} />}
62
+ </View>
63
+ <Typography variant={HeadingVariants.H3} style={labelStyle}>
64
+ {label}
65
+ </Typography>
66
+ </View>
67
+ )
68
+ }
69
+
70
+ const styles = StyleSheet.create({
71
+ container: {
72
+ alignItems: 'center',
73
+ gap: SPACING[100],
74
+ },
75
+ circle: {
76
+ width: CIRCLE_SIZE,
77
+ height: CIRCLE_SIZE,
78
+ borderRadius: CIRCLE_BORDER_RADIUS,
79
+ alignItems: 'center',
80
+ justifyContent: 'center',
81
+ },
82
+ })
@@ -0,0 +1,51 @@
1
+ import React from 'react'
2
+ import { View, StyleSheet } from 'react-native'
3
+ import { BORDER_RADIUS, COLORS, SHADOWS, SPACING, Typography } from '@magmamath/react-native-ui'
4
+ import { StreakDay } from './DayStreak'
5
+ import { useFluencyModeUIPreset } from '../../hooks/useFluencyModeUIPreset'
6
+
7
+ const CONTAINER_WIDTH = 230
8
+ const STREAK_DAYS_MARGIN_TOP = 10
9
+
10
+ type DayStreakCounterProps = {}
11
+
12
+ export const DayStreakCounter = ({}: DayStreakCounterProps) => {
13
+ const { streakColor } = useFluencyModeUIPreset()
14
+
15
+ return (
16
+ <View style={styles.container}>
17
+ <Typography style={styles.label}>Practice this week</Typography>
18
+
19
+ <View style={styles.streakDays}>
20
+ {/* TODO: Replace hardcoded days and statuses with real streak data from the model */}
21
+ <StreakDay label="M" status="gained" streakColor={streakColor} />
22
+ <StreakDay label="T" status="gained" streakColor={streakColor} />
23
+ <StreakDay label="W" status="missed" streakColor={streakColor} />
24
+ <StreakDay label="T" status="today" streakColor={streakColor} />
25
+ <StreakDay label="F" status="gained" streakColor={streakColor} />
26
+ </View>
27
+ </View>
28
+ )
29
+ }
30
+
31
+ const styles = StyleSheet.create({
32
+ container: {
33
+ height: '100%',
34
+ width: CONTAINER_WIDTH,
35
+ paddingVertical: SPACING[200],
36
+ paddingHorizontal: SPACING[400],
37
+ borderRadius: BORDER_RADIUS[300],
38
+ backgroundColor: COLORS.NEUTRAL_1,
39
+ ...SHADOWS[1],
40
+ },
41
+ label: {
42
+ fontSize: SPACING[300],
43
+ fontWeight: '700',
44
+ color: COLORS.NEUTRAL_8,
45
+ },
46
+ streakDays: {
47
+ flexDirection: 'row',
48
+ marginTop: STREAK_DAYS_MARGIN_TOP,
49
+ gap: SPACING[200],
50
+ },
51
+ })
@@ -0,0 +1,30 @@
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
+ type FluencyMatrixProps = {}
8
+
9
+ export const FluencyMatrix = ({}: FluencyMatrixProps) => (
10
+ <View style={styles.container}>
11
+ <MatrixLegend />
12
+ <View style={styles.body}>
13
+ <MatrixFill />
14
+ </View>
15
+ </View>
16
+ )
17
+
18
+ const styles = StyleSheet.create({
19
+ container: {
20
+ flex: 1,
21
+ backgroundColor: COLORS.NEUTRAL_1,
22
+ borderRadius: BORDER_RADIUS[400],
23
+ overflow: 'hidden',
24
+ ...SHADOWS[1],
25
+ },
26
+ body: {
27
+ flex: 1,
28
+ padding: SPACING[300],
29
+ },
30
+ })
@@ -0,0 +1,86 @@
1
+ import React from 'react'
2
+ import { View, Text, StyleSheet } from 'react-native'
3
+ import { BORDER_RADIUS, COLORS, SPACING } from '@magmamath/react-native-ui'
4
+ import { FluencyModePreset } from '../../../fluency.constants'
5
+ import { useFluencyModeUIPreset } from '../../../hooks/useFluencyModeUIPreset'
6
+
7
+ const GRID_SIZE = 21
8
+ const HEADER_FONT_SIZE = 13
9
+
10
+ type MasteryColors = FluencyModePreset['mastery']
11
+
12
+ const getMasteryColor = (sum: number, mastery: MasteryColors): string => {
13
+ if (sum <= 9) return mastery.mastered
14
+ if (sum <= 17) return mastery.strong
15
+ if (sum <= 24) return mastery.growing
16
+ if (sum <= 32) return mastery.developing
17
+ return mastery.learning
18
+ }
19
+
20
+ const getCellBackground = (row: number, col: number, mastery: MasteryColors): string => {
21
+ if (row === 0 && col === 0) return COLORS.NEUTRAL_2
22
+ if (row === 0 || col === 0) return COLORS.NEUTRAL_5
23
+ return getMasteryColor(row + col, mastery)
24
+ }
25
+
26
+ const getCellLabel = (row: number, col: number): number | null => {
27
+ if (row === 0 && col === 0) return null
28
+ if (row === 0) return col
29
+ if (col === 0) return row
30
+ return null
31
+ }
32
+
33
+ type MatrixCellProps = {
34
+ row: number
35
+ col: number
36
+ mastery: MasteryColors
37
+ }
38
+
39
+ const MatrixCell = ({ row, col, mastery }: MatrixCellProps) => {
40
+ const label = getCellLabel(row, col)
41
+ return (
42
+ <View style={[styles.cell, { backgroundColor: getCellBackground(row, col, mastery) }]}>
43
+ {label !== null && <Text style={styles.headerText}>{label}</Text>}
44
+ </View>
45
+ )
46
+ }
47
+
48
+ type MatrixFillProps = {}
49
+
50
+ export const MatrixFill = ({}: MatrixFillProps) => {
51
+ const { mastery } = useFluencyModeUIPreset()
52
+
53
+ return (
54
+ <View style={styles.grid}>
55
+ {Array.from({ length: GRID_SIZE }, (_, row) => (
56
+ <View key={row} style={styles.row}>
57
+ {Array.from({ length: GRID_SIZE }, (_, col) => (
58
+ <MatrixCell key={col} row={row} col={col} mastery={mastery} />
59
+ ))}
60
+ </View>
61
+ ))}
62
+ </View>
63
+ )
64
+ }
65
+
66
+ const styles = StyleSheet.create({
67
+ grid: {
68
+ flex: 1,
69
+ gap: SPACING[50],
70
+ },
71
+ row: {
72
+ flex: 1,
73
+ flexDirection: 'row',
74
+ gap: SPACING[50],
75
+ },
76
+ cell: {
77
+ flex: 1,
78
+ borderRadius: BORDER_RADIUS[100],
79
+ alignItems: 'center',
80
+ justifyContent: 'center',
81
+ },
82
+ headerText: {
83
+ fontSize: HEADER_FONT_SIZE,
84
+ color: COLORS.NEUTRAL_2,
85
+ },
86
+ })