@magmamath/students-features 1.8.0-rc.0-fluency-visuals → 1.8.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 (437) hide show
  1. package/dist/commonjs/features/fluency/components/FluencySolving.js +2 -2
  2. package/dist/commonjs/features/fluency/components/FluencySolving.js.map +1 -1
  3. package/dist/commonjs/features/fluency/components/fluency-solving/components/EquationContent.js +8 -9
  4. package/dist/commonjs/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -1
  5. package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.js +1 -3
  6. package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.js.map +1 -1
  7. package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.js +10 -63
  8. package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.js.map +1 -1
  9. package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js +0 -10
  10. package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js.map +1 -1
  11. package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js +2 -0
  12. package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js.map +1 -1
  13. package/dist/commonjs/features/fluency/index.js +0 -20
  14. package/dist/commonjs/features/fluency/index.js.map +1 -1
  15. package/dist/commonjs/features/fluency-teacher/assets/{SortDefaultIcon.js → DivisionIcon.js} +11 -8
  16. package/dist/commonjs/features/fluency-teacher/assets/DivisionIcon.js.map +1 -0
  17. package/dist/commonjs/features/fluency-teacher/components/FluencyTeacher.js +4 -3
  18. package/dist/commonjs/features/fluency-teacher/components/FluencyTeacher.js.map +1 -1
  19. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerHeader.js +48 -43
  20. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerHeader.js.map +1 -1
  21. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerMatrixes.js +11 -28
  22. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerMatrixes.js.map +1 -1
  23. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorBox.js +27 -44
  24. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorBox.js.map +1 -1
  25. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.js +47 -40
  26. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.js.map +1 -1
  27. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerStats.js +14 -24
  28. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerStats.js.map +1 -1
  29. package/dist/commonjs/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.js +6 -6
  30. package/dist/commonjs/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.js.map +1 -1
  31. package/dist/commonjs/features/fluency-teacher/components/matrix/DrawerMatrix.js.map +1 -1
  32. package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixCell.js +2 -16
  33. package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixCell.js.map +1 -1
  34. package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixLegend.js +83 -0
  35. package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixLegend.js.map +1 -0
  36. package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixRow.js +1 -2
  37. package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixRow.js.map +1 -1
  38. package/dist/commonjs/features/fluency-teacher/components/table/AllPupilsTableRow.js +15 -41
  39. package/dist/commonjs/features/fluency-teacher/components/table/AllPupilsTableRow.js.map +1 -1
  40. package/dist/commonjs/features/fluency-teacher/components/table/AverageCell.js +55 -0
  41. package/dist/commonjs/features/fluency-teacher/components/table/AverageCell.js.map +1 -0
  42. package/dist/commonjs/features/fluency-teacher/components/table/AverageSortButton.js +6 -62
  43. package/dist/commonjs/features/fluency-teacher/components/table/AverageSortButton.js.map +1 -1
  44. package/dist/commonjs/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js +42 -40
  45. package/dist/commonjs/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js.map +1 -1
  46. package/dist/commonjs/features/fluency-teacher/components/table/OperatorBadge.js +25 -16
  47. package/dist/commonjs/features/fluency-teacher/components/table/OperatorBadge.js.map +1 -1
  48. package/dist/commonjs/features/fluency-teacher/components/table/SortOrderCarets.js +40 -0
  49. package/dist/commonjs/features/fluency-teacher/components/table/SortOrderCarets.js.map +1 -0
  50. package/dist/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.js +30 -40
  51. package/dist/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.js.map +1 -1
  52. package/dist/commonjs/features/fluency-teacher/components/table/TableRow.js +59 -72
  53. package/dist/commonjs/features/fluency-teacher/components/table/TableRow.js.map +1 -1
  54. package/dist/commonjs/features/fluency-teacher/components/table/tableCell.styles.js +45 -0
  55. package/dist/commonjs/features/fluency-teacher/components/table/tableCell.styles.js.map +1 -0
  56. package/dist/commonjs/features/fluency-teacher/context/TeacherFluencyContext.js.map +1 -1
  57. package/dist/commonjs/features/fluency-teacher/fluencyTeacher.constants.js +103 -38
  58. package/dist/commonjs/features/fluency-teacher/fluencyTeacher.constants.js.map +1 -1
  59. package/dist/commonjs/features/fluency-teacher/fluencyTeacher.helpers.js +52 -10
  60. package/dist/commonjs/features/fluency-teacher/fluencyTeacher.helpers.js.map +1 -1
  61. package/dist/commonjs/features/fluency-teacher/hooks/useDrawerGrid.js +3 -2
  62. package/dist/commonjs/features/fluency-teacher/hooks/useDrawerGrid.js.map +1 -1
  63. package/dist/commonjs/features/fluency-teacher/hooks/useDrawerMatrix.js.map +1 -1
  64. package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.js +2 -1
  65. package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.js.map +1 -1
  66. package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyModel.js +9 -0
  67. package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyModel.js.map +1 -1
  68. package/dist/module/features/fluency/components/FluencySolving.js +2 -2
  69. package/dist/module/features/fluency/components/FluencySolving.js.map +1 -1
  70. package/dist/module/features/fluency/components/fluency-solving/components/EquationContent.js +8 -9
  71. package/dist/module/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -1
  72. package/dist/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.js +1 -3
  73. package/dist/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.js.map +1 -1
  74. package/dist/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.js +11 -64
  75. package/dist/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.js.map +1 -1
  76. package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js +0 -10
  77. package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js.map +1 -1
  78. package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js +2 -0
  79. package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js.map +1 -1
  80. package/dist/module/features/fluency/index.js +0 -2
  81. package/dist/module/features/fluency/index.js.map +1 -1
  82. package/dist/module/features/fluency-teacher/assets/DivisionIcon.js +26 -0
  83. package/dist/module/features/fluency-teacher/assets/DivisionIcon.js.map +1 -0
  84. package/dist/module/features/fluency-teacher/components/FluencyTeacher.js +4 -3
  85. package/dist/module/features/fluency-teacher/components/FluencyTeacher.js.map +1 -1
  86. package/dist/module/features/fluency-teacher/components/drawer/DrawerHeader.js +49 -44
  87. package/dist/module/features/fluency-teacher/components/drawer/DrawerHeader.js.map +1 -1
  88. package/dist/module/features/fluency-teacher/components/drawer/DrawerMatrixes.js +14 -31
  89. package/dist/module/features/fluency-teacher/components/drawer/DrawerMatrixes.js.map +1 -1
  90. package/dist/module/features/fluency-teacher/components/drawer/DrawerOperatorBox.js +28 -45
  91. package/dist/module/features/fluency-teacher/components/drawer/DrawerOperatorBox.js.map +1 -1
  92. package/dist/module/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.js +48 -41
  93. package/dist/module/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.js.map +1 -1
  94. package/dist/module/features/fluency-teacher/components/drawer/DrawerStats.js +17 -27
  95. package/dist/module/features/fluency-teacher/components/drawer/DrawerStats.js.map +1 -1
  96. package/dist/module/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.js +6 -6
  97. package/dist/module/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.js.map +1 -1
  98. package/dist/module/features/fluency-teacher/components/matrix/DrawerMatrix.js.map +1 -1
  99. package/dist/module/features/fluency-teacher/components/matrix/MatrixCell.js +3 -17
  100. package/dist/module/features/fluency-teacher/components/matrix/MatrixCell.js.map +1 -1
  101. package/dist/module/features/fluency-teacher/components/matrix/MatrixLegend.js +77 -0
  102. package/dist/module/features/fluency-teacher/components/matrix/MatrixLegend.js.map +1 -0
  103. package/dist/module/features/fluency-teacher/components/matrix/MatrixRow.js +1 -2
  104. package/dist/module/features/fluency-teacher/components/matrix/MatrixRow.js.map +1 -1
  105. package/dist/module/features/fluency-teacher/components/table/AllPupilsTableRow.js +16 -42
  106. package/dist/module/features/fluency-teacher/components/table/AllPupilsTableRow.js.map +1 -1
  107. package/dist/module/features/fluency-teacher/components/table/AverageCell.js +49 -0
  108. package/dist/module/features/fluency-teacher/components/table/AverageCell.js.map +1 -0
  109. package/dist/module/features/fluency-teacher/components/table/AverageSortButton.js +7 -63
  110. package/dist/module/features/fluency-teacher/components/table/AverageSortButton.js.map +1 -1
  111. package/dist/module/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js +44 -42
  112. package/dist/module/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js.map +1 -1
  113. package/dist/module/features/fluency-teacher/components/table/OperatorBadge.js +25 -16
  114. package/dist/module/features/fluency-teacher/components/table/OperatorBadge.js.map +1 -1
  115. package/dist/module/features/fluency-teacher/components/table/SortOrderCarets.js +34 -0
  116. package/dist/module/features/fluency-teacher/components/table/SortOrderCarets.js.map +1 -0
  117. package/dist/module/features/fluency-teacher/components/table/TableColumnSortButton.js +32 -42
  118. package/dist/module/features/fluency-teacher/components/table/TableColumnSortButton.js.map +1 -1
  119. package/dist/module/features/fluency-teacher/components/table/TableRow.js +62 -75
  120. package/dist/module/features/fluency-teacher/components/table/TableRow.js.map +1 -1
  121. package/dist/module/features/fluency-teacher/components/table/tableCell.styles.js +42 -0
  122. package/dist/module/features/fluency-teacher/components/table/tableCell.styles.js.map +1 -0
  123. package/dist/module/features/fluency-teacher/context/TeacherFluencyContext.js.map +1 -1
  124. package/dist/module/features/fluency-teacher/fluencyTeacher.constants.js +102 -37
  125. package/dist/module/features/fluency-teacher/fluencyTeacher.constants.js.map +1 -1
  126. package/dist/module/features/fluency-teacher/fluencyTeacher.helpers.js +43 -8
  127. package/dist/module/features/fluency-teacher/fluencyTeacher.helpers.js.map +1 -1
  128. package/dist/module/features/fluency-teacher/hooks/useDrawerGrid.js +3 -2
  129. package/dist/module/features/fluency-teacher/hooks/useDrawerGrid.js.map +1 -1
  130. package/dist/module/features/fluency-teacher/hooks/useDrawerMatrix.js.map +1 -1
  131. package/dist/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.js +2 -1
  132. package/dist/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.js.map +1 -1
  133. package/dist/module/features/fluency-teacher/model/TeacherFluencyModel.js +9 -0
  134. package/dist/module/features/fluency-teacher/model/TeacherFluencyModel.js.map +1 -1
  135. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -1
  136. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.d.ts.map +1 -1
  137. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts +1 -2
  138. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -1
  139. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.d.ts.map +1 -1
  140. package/dist/typescript/commonjs/features/fluency/index.d.ts +0 -2
  141. package/dist/typescript/commonjs/features/fluency/index.d.ts.map +1 -1
  142. package/dist/typescript/commonjs/features/fluency-teacher/assets/DivisionIcon.d.ts +4 -0
  143. package/dist/typescript/commonjs/features/fluency-teacher/assets/DivisionIcon.d.ts.map +1 -0
  144. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerHeader.d.ts.map +1 -1
  145. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerMatrixes.d.ts.map +1 -1
  146. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorBox.d.ts +1 -4
  147. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorBox.d.ts.map +1 -1
  148. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.d.ts +6 -4
  149. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.d.ts.map +1 -1
  150. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerStats.d.ts.map +1 -1
  151. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.d.ts.map +1 -1
  152. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/DrawerMatrix.d.ts +3 -2
  153. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/DrawerMatrix.d.ts.map +1 -1
  154. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixCell.d.ts +6 -5
  155. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixCell.d.ts.map +1 -1
  156. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixHeaderRow.d.ts +2 -1
  157. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixHeaderRow.d.ts.map +1 -1
  158. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixLegend.d.ts +10 -0
  159. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixLegend.d.ts.map +1 -0
  160. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixRow.d.ts +5 -3
  161. package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixRow.d.ts.map +1 -1
  162. package/dist/typescript/commonjs/features/fluency-teacher/components/table/AllPupilsTableRow.d.ts.map +1 -1
  163. package/dist/typescript/commonjs/features/fluency-teacher/components/table/AverageCell.d.ts +9 -0
  164. package/dist/typescript/commonjs/features/fluency-teacher/components/table/AverageCell.d.ts.map +1 -0
  165. package/dist/typescript/commonjs/features/fluency-teacher/components/table/AverageSortButton.d.ts +2 -1
  166. package/dist/typescript/commonjs/features/fluency-teacher/components/table/AverageSortButton.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.d.ts.map +1 -1
  168. package/dist/typescript/commonjs/features/fluency-teacher/components/table/OperatorBadge.d.ts +5 -4
  169. package/dist/typescript/commonjs/features/fluency-teacher/components/table/OperatorBadge.d.ts.map +1 -1
  170. package/dist/typescript/commonjs/features/fluency-teacher/components/table/SortOrderCarets.d.ts +9 -0
  171. package/dist/typescript/commonjs/features/fluency-teacher/components/table/SortOrderCarets.d.ts.map +1 -0
  172. package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.d.ts +7 -6
  173. package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.d.ts.map +1 -1
  174. package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableRow.d.ts +4 -3
  175. package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableRow.d.ts.map +1 -1
  176. package/dist/typescript/commonjs/features/fluency-teacher/components/table/tableCell.styles.d.ts +35 -0
  177. package/dist/typescript/commonjs/features/fluency-teacher/components/table/tableCell.styles.d.ts.map +1 -0
  178. package/dist/typescript/commonjs/features/fluency-teacher/context/TeacherFluencyContext.d.ts +1 -0
  179. package/dist/typescript/commonjs/features/fluency-teacher/context/TeacherFluencyContext.d.ts.map +1 -1
  180. package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.constants.d.ts +16 -3
  181. package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.constants.d.ts.map +1 -1
  182. package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.helpers.d.ts +11 -4
  183. package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.helpers.d.ts.map +1 -1
  184. package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.types.d.ts +35 -6
  185. package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.types.d.ts.map +1 -1
  186. package/dist/typescript/commonjs/features/fluency-teacher/hooks/useDrawerGrid.d.ts +1 -12
  187. package/dist/typescript/commonjs/features/fluency-teacher/hooks/useDrawerGrid.d.ts.map +1 -1
  188. package/dist/typescript/commonjs/features/fluency-teacher/hooks/useDrawerMatrix.d.ts +3 -3
  189. package/dist/typescript/commonjs/features/fluency-teacher/hooks/useDrawerMatrix.d.ts.map +1 -1
  190. package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts +1 -0
  191. package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts.map +1 -1
  192. package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyModel.d.ts.map +1 -1
  193. package/dist/typescript/module/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -1
  194. package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.d.ts.map +1 -1
  195. package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts +1 -2
  196. package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -1
  197. package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.d.ts.map +1 -1
  198. package/dist/typescript/module/features/fluency/index.d.ts +0 -2
  199. package/dist/typescript/module/features/fluency/index.d.ts.map +1 -1
  200. package/dist/typescript/module/features/fluency-teacher/assets/DivisionIcon.d.ts +4 -0
  201. package/dist/typescript/module/features/fluency-teacher/assets/DivisionIcon.d.ts.map +1 -0
  202. package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerHeader.d.ts.map +1 -1
  203. package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerMatrixes.d.ts.map +1 -1
  204. package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerOperatorBox.d.ts +1 -4
  205. package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerOperatorBox.d.ts.map +1 -1
  206. package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.d.ts +6 -4
  207. package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.d.ts.map +1 -1
  208. package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerStats.d.ts.map +1 -1
  209. package/dist/typescript/module/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.d.ts.map +1 -1
  210. package/dist/typescript/module/features/fluency-teacher/components/matrix/DrawerMatrix.d.ts +3 -2
  211. package/dist/typescript/module/features/fluency-teacher/components/matrix/DrawerMatrix.d.ts.map +1 -1
  212. package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixCell.d.ts +6 -5
  213. package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixCell.d.ts.map +1 -1
  214. package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixHeaderRow.d.ts +2 -1
  215. package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixHeaderRow.d.ts.map +1 -1
  216. package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixLegend.d.ts +10 -0
  217. package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixLegend.d.ts.map +1 -0
  218. package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixRow.d.ts +5 -3
  219. package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixRow.d.ts.map +1 -1
  220. package/dist/typescript/module/features/fluency-teacher/components/table/AllPupilsTableRow.d.ts.map +1 -1
  221. package/dist/typescript/module/features/fluency-teacher/components/table/AverageCell.d.ts +9 -0
  222. package/dist/typescript/module/features/fluency-teacher/components/table/AverageCell.d.ts.map +1 -0
  223. package/dist/typescript/module/features/fluency-teacher/components/table/AverageSortButton.d.ts +2 -1
  224. package/dist/typescript/module/features/fluency-teacher/components/table/AverageSortButton.d.ts.map +1 -1
  225. package/dist/typescript/module/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.d.ts.map +1 -1
  226. package/dist/typescript/module/features/fluency-teacher/components/table/OperatorBadge.d.ts +5 -4
  227. package/dist/typescript/module/features/fluency-teacher/components/table/OperatorBadge.d.ts.map +1 -1
  228. package/dist/typescript/module/features/fluency-teacher/components/table/SortOrderCarets.d.ts +9 -0
  229. package/dist/typescript/module/features/fluency-teacher/components/table/SortOrderCarets.d.ts.map +1 -0
  230. package/dist/typescript/module/features/fluency-teacher/components/table/TableColumnSortButton.d.ts +7 -6
  231. package/dist/typescript/module/features/fluency-teacher/components/table/TableColumnSortButton.d.ts.map +1 -1
  232. package/dist/typescript/module/features/fluency-teacher/components/table/TableRow.d.ts +4 -3
  233. package/dist/typescript/module/features/fluency-teacher/components/table/TableRow.d.ts.map +1 -1
  234. package/dist/typescript/module/features/fluency-teacher/components/table/tableCell.styles.d.ts +35 -0
  235. package/dist/typescript/module/features/fluency-teacher/components/table/tableCell.styles.d.ts.map +1 -0
  236. package/dist/typescript/module/features/fluency-teacher/context/TeacherFluencyContext.d.ts +1 -0
  237. package/dist/typescript/module/features/fluency-teacher/context/TeacherFluencyContext.d.ts.map +1 -1
  238. package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.constants.d.ts +16 -3
  239. package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.constants.d.ts.map +1 -1
  240. package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.helpers.d.ts +11 -4
  241. package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.helpers.d.ts.map +1 -1
  242. package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.types.d.ts +35 -6
  243. package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.types.d.ts.map +1 -1
  244. package/dist/typescript/module/features/fluency-teacher/hooks/useDrawerGrid.d.ts +1 -12
  245. package/dist/typescript/module/features/fluency-teacher/hooks/useDrawerGrid.d.ts.map +1 -1
  246. package/dist/typescript/module/features/fluency-teacher/hooks/useDrawerMatrix.d.ts +3 -3
  247. package/dist/typescript/module/features/fluency-teacher/hooks/useDrawerMatrix.d.ts.map +1 -1
  248. package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts +1 -0
  249. package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts.map +1 -1
  250. package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyModel.d.ts.map +1 -1
  251. package/package.json +1 -1
  252. package/src/features/fluency/components/FluencySolving.tsx +2 -2
  253. package/src/features/fluency/components/fluency-solving/components/EquationContent.tsx +8 -12
  254. package/src/features/fluency/components/fluency-solving/components/FluencyCardDeck.tsx +1 -6
  255. package/src/features/fluency/components/fluency-solving/components/FluencyEquationCard.tsx +11 -63
  256. package/src/features/fluency/components/fluency-solving/components/FluencySolvingHeader.tsx +0 -9
  257. package/src/features/fluency/components/fluency-solving/components/FluencySolvingProgress.tsx +2 -0
  258. package/src/features/fluency/index.ts +0 -2
  259. package/src/features/fluency-teacher/assets/DivisionIcon.tsx +20 -0
  260. package/src/features/fluency-teacher/components/FluencyTeacher.tsx +3 -3
  261. package/src/features/fluency-teacher/components/drawer/DrawerHeader.tsx +37 -35
  262. package/src/features/fluency-teacher/components/drawer/DrawerMatrixes.tsx +13 -32
  263. package/src/features/fluency-teacher/components/drawer/DrawerOperatorBox.tsx +20 -40
  264. package/src/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.tsx +35 -35
  265. package/src/features/fluency-teacher/components/drawer/DrawerStats.tsx +16 -28
  266. package/src/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.tsx +4 -5
  267. package/src/features/fluency-teacher/components/matrix/DrawerMatrix.tsx +3 -2
  268. package/src/features/fluency-teacher/components/matrix/MatrixCell.tsx +7 -16
  269. package/src/features/fluency-teacher/components/matrix/MatrixHeaderRow.tsx +1 -1
  270. package/src/features/fluency-teacher/components/matrix/MatrixLegend.tsx +81 -0
  271. package/src/features/fluency-teacher/components/matrix/MatrixRow.tsx +4 -4
  272. package/src/features/fluency-teacher/components/table/AllPupilsTableRow.tsx +13 -40
  273. package/src/features/fluency-teacher/components/table/AverageCell.tsx +45 -0
  274. package/src/features/fluency-teacher/components/table/AverageSortButton.tsx +8 -62
  275. package/src/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.tsx +49 -35
  276. package/src/features/fluency-teacher/components/table/OperatorBadge.tsx +18 -11
  277. package/src/features/fluency-teacher/components/table/SortOrderCarets.tsx +37 -0
  278. package/src/features/fluency-teacher/components/table/TableColumnSortButton.tsx +28 -49
  279. package/src/features/fluency-teacher/components/table/TableRow.tsx +65 -64
  280. package/src/features/fluency-teacher/components/table/tableCell.styles.ts +39 -0
  281. package/src/features/fluency-teacher/context/TeacherFluencyContext.ts +1 -0
  282. package/src/features/fluency-teacher/fluencyTeacher.constants.ts +138 -40
  283. package/src/features/fluency-teacher/fluencyTeacher.helpers.ts +82 -10
  284. package/src/features/fluency-teacher/fluencyTeacher.types.ts +39 -6
  285. package/src/features/fluency-teacher/hooks/useDrawerGrid.ts +4 -7
  286. package/src/features/fluency-teacher/hooks/useDrawerMatrix.ts +4 -3
  287. package/src/features/fluency-teacher/model/TeacherFluencyFiltersModel.ts +8 -5
  288. package/src/features/fluency-teacher/model/TeacherFluencyModel.ts +8 -0
  289. package/dist/commonjs/features/fluency/components/FluencyVisualPlayground.js +0 -386
  290. package/dist/commonjs/features/fluency/components/FluencyVisualPlayground.js.map +0 -1
  291. package/dist/commonjs/features/fluency/components/fluency-solving/components/DebugBoxIndicator.js +0 -48
  292. package/dist/commonjs/features/fluency/components/fluency-solving/components/DebugBoxIndicator.js.map +0 -1
  293. package/dist/commonjs/features/fluency/visual-scaffolding/adapter.js +0 -36
  294. package/dist/commonjs/features/fluency/visual-scaffolding/adapter.js.map +0 -1
  295. package/dist/commonjs/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.js +0 -232
  296. package/dist/commonjs/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.js.map +0 -1
  297. package/dist/commonjs/features/fluency/visual-scaffolding/components/Dot.js +0 -51
  298. package/dist/commonjs/features/fluency/visual-scaffolding/components/Dot.js.map +0 -1
  299. package/dist/commonjs/features/fluency/visual-scaffolding/components/DynamicNumberLine.js +0 -104
  300. package/dist/commonjs/features/fluency/visual-scaffolding/components/DynamicNumberLine.js.map +0 -1
  301. package/dist/commonjs/features/fluency/visual-scaffolding/components/FactVisual.js +0 -75
  302. package/dist/commonjs/features/fluency/visual-scaffolding/components/FactVisual.js.map +0 -1
  303. package/dist/commonjs/features/fluency/visual-scaffolding/components/QuotativeBars.js +0 -91
  304. package/dist/commonjs/features/fluency/visual-scaffolding/components/QuotativeBars.js.map +0 -1
  305. package/dist/commonjs/features/fluency/visual-scaffolding/components/RelationalBlock.js +0 -279
  306. package/dist/commonjs/features/fluency/visual-scaffolding/components/RelationalBlock.js.map +0 -1
  307. package/dist/commonjs/features/fluency/visual-scaffolding/components/visualColors.js +0 -44
  308. package/dist/commonjs/features/fluency/visual-scaffolding/components/visualColors.js.map +0 -1
  309. package/dist/commonjs/features/fluency/visual-scaffolding/index.js +0 -73
  310. package/dist/commonjs/features/fluency/visual-scaffolding/index.js.map +0 -1
  311. package/dist/commonjs/features/fluency/visual-scaffolding/renderFact.js +0 -276
  312. package/dist/commonjs/features/fluency/visual-scaffolding/renderFact.js.map +0 -1
  313. package/dist/commonjs/features/fluency/visual-scaffolding/types.js +0 -2
  314. package/dist/commonjs/features/fluency/visual-scaffolding/types.js.map +0 -1
  315. package/dist/commonjs/features/fluency-teacher/assets/SortDefaultIcon.js.map +0 -1
  316. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerMasteryLegend.js +0 -80
  317. package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerMasteryLegend.js.map +0 -1
  318. package/dist/commonjs/features/fluency-teacher/components/table/TableRowAverageProgress.js +0 -71
  319. package/dist/commonjs/features/fluency-teacher/components/table/TableRowAverageProgress.js.map +0 -1
  320. package/dist/module/features/fluency/components/FluencyVisualPlayground.js +0 -379
  321. package/dist/module/features/fluency/components/FluencyVisualPlayground.js.map +0 -1
  322. package/dist/module/features/fluency/components/fluency-solving/components/DebugBoxIndicator.js +0 -43
  323. package/dist/module/features/fluency/components/fluency-solving/components/DebugBoxIndicator.js.map +0 -1
  324. package/dist/module/features/fluency/visual-scaffolding/adapter.js +0 -31
  325. package/dist/module/features/fluency/visual-scaffolding/adapter.js.map +0 -1
  326. package/dist/module/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.js +0 -225
  327. package/dist/module/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.js.map +0 -1
  328. package/dist/module/features/fluency/visual-scaffolding/components/Dot.js +0 -45
  329. package/dist/module/features/fluency/visual-scaffolding/components/Dot.js.map +0 -1
  330. package/dist/module/features/fluency/visual-scaffolding/components/DynamicNumberLine.js +0 -96
  331. package/dist/module/features/fluency/visual-scaffolding/components/DynamicNumberLine.js.map +0 -1
  332. package/dist/module/features/fluency/visual-scaffolding/components/FactVisual.js +0 -69
  333. package/dist/module/features/fluency/visual-scaffolding/components/FactVisual.js.map +0 -1
  334. package/dist/module/features/fluency/visual-scaffolding/components/QuotativeBars.js +0 -83
  335. package/dist/module/features/fluency/visual-scaffolding/components/QuotativeBars.js.map +0 -1
  336. package/dist/module/features/fluency/visual-scaffolding/components/RelationalBlock.js +0 -272
  337. package/dist/module/features/fluency/visual-scaffolding/components/RelationalBlock.js.map +0 -1
  338. package/dist/module/features/fluency/visual-scaffolding/components/visualColors.js +0 -41
  339. package/dist/module/features/fluency/visual-scaffolding/components/visualColors.js.map +0 -1
  340. package/dist/module/features/fluency/visual-scaffolding/index.js +0 -8
  341. package/dist/module/features/fluency/visual-scaffolding/index.js.map +0 -1
  342. package/dist/module/features/fluency/visual-scaffolding/renderFact.js +0 -269
  343. package/dist/module/features/fluency/visual-scaffolding/renderFact.js.map +0 -1
  344. package/dist/module/features/fluency/visual-scaffolding/types.js +0 -2
  345. package/dist/module/features/fluency/visual-scaffolding/types.js.map +0 -1
  346. package/dist/module/features/fluency-teacher/assets/SortDefaultIcon.js +0 -23
  347. package/dist/module/features/fluency-teacher/assets/SortDefaultIcon.js.map +0 -1
  348. package/dist/module/features/fluency-teacher/components/drawer/DrawerMasteryLegend.js +0 -74
  349. package/dist/module/features/fluency-teacher/components/drawer/DrawerMasteryLegend.js.map +0 -1
  350. package/dist/module/features/fluency-teacher/components/table/TableRowAverageProgress.js +0 -65
  351. package/dist/module/features/fluency-teacher/components/table/TableRowAverageProgress.js.map +0 -1
  352. package/dist/typescript/commonjs/features/fluency/components/FluencyVisualPlayground.d.ts +0 -8
  353. package/dist/typescript/commonjs/features/fluency/components/FluencyVisualPlayground.d.ts.map +0 -1
  354. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/DebugBoxIndicator.d.ts +0 -3
  355. package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/DebugBoxIndicator.d.ts.map +0 -1
  356. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/__tests__/renderFact.test.d.ts +0 -2
  357. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/__tests__/renderFact.test.d.ts.map +0 -1
  358. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/adapter.d.ts +0 -4
  359. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/adapter.d.ts.map +0 -1
  360. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.d.ts +0 -10
  361. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.d.ts.map +0 -1
  362. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/Dot.d.ts +0 -10
  363. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/Dot.d.ts.map +0 -1
  364. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/DynamicNumberLine.d.ts +0 -10
  365. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/DynamicNumberLine.d.ts.map +0 -1
  366. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/FactVisual.d.ts +0 -10
  367. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/FactVisual.d.ts.map +0 -1
  368. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/QuotativeBars.d.ts +0 -10
  369. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/QuotativeBars.d.ts.map +0 -1
  370. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/RelationalBlock.d.ts +0 -10
  371. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/RelationalBlock.d.ts.map +0 -1
  372. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/visualColors.d.ts +0 -16
  373. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/visualColors.d.ts.map +0 -1
  374. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/index.d.ts +0 -6
  375. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/index.d.ts.map +0 -1
  376. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/renderFact.d.ts +0 -23
  377. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/renderFact.d.ts.map +0 -1
  378. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/types.d.ts +0 -103
  379. package/dist/typescript/commonjs/features/fluency/visual-scaffolding/types.d.ts.map +0 -1
  380. package/dist/typescript/commonjs/features/fluency-teacher/assets/SortDefaultIcon.d.ts +0 -4
  381. package/dist/typescript/commonjs/features/fluency-teacher/assets/SortDefaultIcon.d.ts.map +0 -1
  382. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerMasteryLegend.d.ts +0 -3
  383. package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerMasteryLegend.d.ts.map +0 -1
  384. package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableRowAverageProgress.d.ts +0 -7
  385. package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableRowAverageProgress.d.ts.map +0 -1
  386. package/dist/typescript/module/features/fluency/components/FluencyVisualPlayground.d.ts +0 -8
  387. package/dist/typescript/module/features/fluency/components/FluencyVisualPlayground.d.ts.map +0 -1
  388. package/dist/typescript/module/features/fluency/components/fluency-solving/components/DebugBoxIndicator.d.ts +0 -3
  389. package/dist/typescript/module/features/fluency/components/fluency-solving/components/DebugBoxIndicator.d.ts.map +0 -1
  390. package/dist/typescript/module/features/fluency/visual-scaffolding/__tests__/renderFact.test.d.ts +0 -2
  391. package/dist/typescript/module/features/fluency/visual-scaffolding/__tests__/renderFact.test.d.ts.map +0 -1
  392. package/dist/typescript/module/features/fluency/visual-scaffolding/adapter.d.ts +0 -4
  393. package/dist/typescript/module/features/fluency/visual-scaffolding/adapter.d.ts.map +0 -1
  394. package/dist/typescript/module/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.d.ts +0 -10
  395. package/dist/typescript/module/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.d.ts.map +0 -1
  396. package/dist/typescript/module/features/fluency/visual-scaffolding/components/Dot.d.ts +0 -10
  397. package/dist/typescript/module/features/fluency/visual-scaffolding/components/Dot.d.ts.map +0 -1
  398. package/dist/typescript/module/features/fluency/visual-scaffolding/components/DynamicNumberLine.d.ts +0 -10
  399. package/dist/typescript/module/features/fluency/visual-scaffolding/components/DynamicNumberLine.d.ts.map +0 -1
  400. package/dist/typescript/module/features/fluency/visual-scaffolding/components/FactVisual.d.ts +0 -10
  401. package/dist/typescript/module/features/fluency/visual-scaffolding/components/FactVisual.d.ts.map +0 -1
  402. package/dist/typescript/module/features/fluency/visual-scaffolding/components/QuotativeBars.d.ts +0 -10
  403. package/dist/typescript/module/features/fluency/visual-scaffolding/components/QuotativeBars.d.ts.map +0 -1
  404. package/dist/typescript/module/features/fluency/visual-scaffolding/components/RelationalBlock.d.ts +0 -10
  405. package/dist/typescript/module/features/fluency/visual-scaffolding/components/RelationalBlock.d.ts.map +0 -1
  406. package/dist/typescript/module/features/fluency/visual-scaffolding/components/visualColors.d.ts +0 -16
  407. package/dist/typescript/module/features/fluency/visual-scaffolding/components/visualColors.d.ts.map +0 -1
  408. package/dist/typescript/module/features/fluency/visual-scaffolding/index.d.ts +0 -6
  409. package/dist/typescript/module/features/fluency/visual-scaffolding/index.d.ts.map +0 -1
  410. package/dist/typescript/module/features/fluency/visual-scaffolding/renderFact.d.ts +0 -23
  411. package/dist/typescript/module/features/fluency/visual-scaffolding/renderFact.d.ts.map +0 -1
  412. package/dist/typescript/module/features/fluency/visual-scaffolding/types.d.ts +0 -103
  413. package/dist/typescript/module/features/fluency/visual-scaffolding/types.d.ts.map +0 -1
  414. package/dist/typescript/module/features/fluency-teacher/assets/SortDefaultIcon.d.ts +0 -4
  415. package/dist/typescript/module/features/fluency-teacher/assets/SortDefaultIcon.d.ts.map +0 -1
  416. package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerMasteryLegend.d.ts +0 -3
  417. package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerMasteryLegend.d.ts.map +0 -1
  418. package/dist/typescript/module/features/fluency-teacher/components/table/TableRowAverageProgress.d.ts +0 -7
  419. package/dist/typescript/module/features/fluency-teacher/components/table/TableRowAverageProgress.d.ts.map +0 -1
  420. package/src/features/fluency/components/FluencyVisualPlayground.tsx +0 -272
  421. package/src/features/fluency/components/fluency-solving/components/DebugBoxIndicator.tsx +0 -40
  422. package/src/features/fluency/visual-scaffolding/__tests__/__snapshots__/renderFact.test.ts.snap +0 -64
  423. package/src/features/fluency/visual-scaffolding/__tests__/renderFact.test.ts +0 -192
  424. package/src/features/fluency/visual-scaffolding/adapter.ts +0 -33
  425. package/src/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.tsx +0 -222
  426. package/src/features/fluency/visual-scaffolding/components/Dot.tsx +0 -36
  427. package/src/features/fluency/visual-scaffolding/components/DynamicNumberLine.tsx +0 -98
  428. package/src/features/fluency/visual-scaffolding/components/FactVisual.tsx +0 -61
  429. package/src/features/fluency/visual-scaffolding/components/QuotativeBars.tsx +0 -92
  430. package/src/features/fluency/visual-scaffolding/components/RelationalBlock.tsx +0 -225
  431. package/src/features/fluency/visual-scaffolding/components/visualColors.ts +0 -45
  432. package/src/features/fluency/visual-scaffolding/index.ts +0 -5
  433. package/src/features/fluency/visual-scaffolding/renderFact.ts +0 -219
  434. package/src/features/fluency/visual-scaffolding/types.ts +0 -108
  435. package/src/features/fluency-teacher/assets/SortDefaultIcon.tsx +0 -10
  436. package/src/features/fluency-teacher/components/drawer/DrawerMasteryLegend.tsx +0 -63
  437. package/src/features/fluency-teacher/components/table/TableRowAverageProgress.tsx +0 -65
@@ -1,92 +0,0 @@
1
- import React from 'react'
2
- import { View, StyleSheet } from 'react-native'
3
- import Svg, { Rect, Path, Text as SvgText } from 'react-native-svg'
4
- import { COLORS, FONT_FAMILY } from '@magmamath/react-native-ui'
5
-
6
- import type { BarSpec } from '../types'
7
- import type { VisualColors } from './visualColors'
8
-
9
- const VB_W = 480
10
- const VB_H = 98
11
- const PAD_X = 24
12
- const BAR_Y = 12
13
- const BAR_H = 46
14
- const BRACKET_Y = BAR_Y + BAR_H + 8
15
-
16
- type QuotativeBarsProps = {
17
- spec: BarSpec
18
- colors: VisualColors
19
- }
20
-
21
- // L2 (division) — quotative model: the dividend bar is cut into equal groups of
22
- // the divisor; counting the groups gives the quotient (the answer).
23
- export const QuotativeBars = ({ spec, colors }: QuotativeBarsProps) => {
24
- const segments = Math.max(1, spec.segmentCount)
25
- const barW = VB_W - 2 * PAD_X
26
- const segW = barW / segments
27
-
28
- return (
29
- <View style={styles.wrapper}>
30
- <Svg width="100%" height="100%" viewBox={`0 0 ${VB_W} ${VB_H}`} preserveAspectRatio="xMidYMid meet">
31
- {Array.from({ length: segments }, (_, i) => {
32
- const x = PAD_X + i * segW
33
- return (
34
- <React.Fragment key={i}>
35
- <Rect
36
- x={x}
37
- y={BAR_Y}
38
- width={segW}
39
- height={BAR_H}
40
- rx={6}
41
- fill={i % 2 === 0 ? colors.bg : colors.mid}
42
- stroke={colors.accent}
43
- strokeWidth={2.5}
44
- />
45
- <SvgText
46
- x={x + segW / 2}
47
- y={BAR_Y + BAR_H / 2 + 7}
48
- fontSize={20}
49
- fontWeight="700"
50
- fontFamily={FONT_FAMILY.buenosAires}
51
- fill={colors.dark}
52
- textAnchor="middle"
53
- >
54
- {spec.segment}
55
- </SvgText>
56
- </React.Fragment>
57
- )
58
- })}
59
-
60
- {/* Bracket spanning the whole bar, drawn as one continuous line. */}
61
- <Path
62
- d={`M ${PAD_X} ${BRACKET_Y} L ${PAD_X} ${BRACKET_Y + 6} L ${VB_W - PAD_X} ${BRACKET_Y + 6} L ${VB_W - PAD_X} ${BRACKET_Y}`}
63
- fill="none"
64
- stroke={COLORS.NEUTRAL_6}
65
- strokeWidth={2.5}
66
- strokeLinecap="round"
67
- strokeLinejoin="round"
68
- />
69
- <SvgText
70
- x={VB_W / 2}
71
- y={BRACKET_Y + 20}
72
- fontSize={15}
73
- fontWeight="700"
74
- fontFamily={FONT_FAMILY.buenosAires}
75
- fill={COLORS.NEUTRAL_8}
76
- textAnchor="middle"
77
- >
78
- {spec.total}
79
- </SvgText>
80
- </Svg>
81
- </View>
82
- )
83
- }
84
-
85
- const styles = StyleSheet.create({
86
- wrapper: {
87
- width: '100%',
88
- maxWidth: VB_W,
89
- aspectRatio: VB_W / VB_H,
90
- alignSelf: 'center',
91
- },
92
- })
@@ -1,225 +0,0 @@
1
- import React from 'react'
2
- import { View, StyleSheet } from 'react-native'
3
- import Svg, { Line, Circle, Text as SvgText } from 'react-native-svg'
4
- import { COLORS, FONT_FAMILY, BORDER_RADIUS, SPACING, Typography } from '@magmamath/react-native-ui'
5
-
6
- import type { NodeValue, RelationalSpec } from '../types'
7
- import type { VisualColors } from './visualColors'
8
-
9
- type RelationalBlockProps = {
10
- spec: RelationalSpec
11
- colors: VisualColors
12
- }
13
-
14
- // L2 — shifts focus from absolute counting to relative part-whole structures.
15
- export const RelationalBlock = ({ spec, colors }: RelationalBlockProps) => {
16
- if (spec.model.type === 'bond') {
17
- return (
18
- <NumberBond
19
- top={spec.model.top}
20
- bottomLeft={spec.model.bottomLeft}
21
- bottomRight={spec.model.bottomRight}
22
- colors={colors}
23
- />
24
- )
25
- }
26
- return (
27
- <AreaModel top={spec.model.top} side={spec.model.side} center={spec.model.center} colors={colors} />
28
- )
29
- }
30
-
31
- // ── Number bond (addition / subtraction) ────────────────────────────────────
32
-
33
- const VB_W = 220
34
- const VB_H = 126
35
- const R = 28
36
- const NODES = {
37
- top: { cx: 110, cy: 32 },
38
- left: { cx: 58, cy: 94 },
39
- right: { cx: 162, cy: 94 },
40
- }
41
-
42
- type NumberBondProps = {
43
- top: NodeValue
44
- bottomLeft: NodeValue
45
- bottomRight: NodeValue
46
- colors: VisualColors
47
- }
48
-
49
- const NumberBond = ({ top, bottomLeft, bottomRight, colors }: NumberBondProps) => {
50
- return (
51
- <View style={styles.bondWrapper}>
52
- <Svg width="100%" height="100%" viewBox={`0 0 ${VB_W} ${VB_H}`} preserveAspectRatio="xMidYMid meet">
53
- <Line x1={NODES.top.cx} y1={NODES.top.cy} x2={NODES.left.cx} y2={NODES.left.cy} stroke={colors.mid} strokeWidth={2.5} />
54
- <Line x1={NODES.top.cx} y1={NODES.top.cy} x2={NODES.right.cx} y2={NODES.right.cy} stroke={colors.mid} strokeWidth={2.5} />
55
- <BondNode pos={NODES.top} value={top} colors={colors} />
56
- <BondNode pos={NODES.left} value={bottomLeft} colors={colors} />
57
- <BondNode pos={NODES.right} value={bottomRight} colors={colors} />
58
- </Svg>
59
- </View>
60
- )
61
- }
62
-
63
- type BondNodeProps = {
64
- pos: { cx: number; cy: number }
65
- value: NodeValue
66
- colors: VisualColors
67
- }
68
-
69
- const BondNode = ({ pos, value, colors }: BondNodeProps) => {
70
- const isUnknown = value === null
71
- return (
72
- <>
73
- <Circle
74
- cx={pos.cx}
75
- cy={pos.cy}
76
- r={R}
77
- fill={isUnknown ? COLORS.NEUTRAL_1 : colors.bg}
78
- stroke={colors.accent}
79
- strokeWidth={2.5}
80
- strokeDasharray={isUnknown ? '5 4' : undefined}
81
- />
82
- <SvgText
83
- x={pos.cx}
84
- y={pos.cy + 10}
85
- fontSize={28}
86
- fontWeight="700"
87
- fontFamily={FONT_FAMILY.buenosAires}
88
- fill={isUnknown ? colors.accent : colors.dark}
89
- textAnchor="middle"
90
- >
91
- {isUnknown ? '?' : value}
92
- </SvgText>
93
- </>
94
- )
95
- }
96
-
97
- // ── Area model (multiplication / division) ──────────────────────────────────
98
-
99
- type AreaModelProps = {
100
- top: NodeValue
101
- side: NodeValue
102
- center: NodeValue
103
- colors: VisualColors
104
- }
105
-
106
- // The rectangle is proportional to the factors using ONE shared unit, so the
107
- // shape is representative: 4×4 is square, and the larger factor always gives
108
- // the longer side. `unit` grows until either dimension hits its available cap,
109
- // so most facts fill the height-limited zone; `maxUnit` only bounds very small
110
- // facts (e.g. 1×1) so they don't balloon to the full box.
111
- const AREA = { availW: 300, availH: 52, maxUnit: 18, minDim: 18, divHeight: 44 }
112
-
113
- type Dims = { width: number; height: number }
114
-
115
- const asFactor = (value: NodeValue): number | null =>
116
- typeof value === 'number' && value > 0 ? value : null
117
-
118
- const areaDims = (top: NodeValue, side: NodeValue): Dims => {
119
- const a = asFactor(top)
120
- const b = asFactor(side)
121
-
122
- if (a !== null && b !== null) {
123
- const unit = Math.min(AREA.availW / a, AREA.availH / b, AREA.maxUnit)
124
- return { width: Math.max(AREA.minDim, a * unit), height: Math.max(AREA.minDim, b * unit) }
125
- }
126
- // One dimension unknown (division): scale the known side, leave a neutral height.
127
- if (a !== null) {
128
- const unit = Math.min(AREA.availW / a, AREA.maxUnit)
129
- return { width: Math.max(AREA.minDim, a * unit), height: AREA.divHeight }
130
- }
131
- return { width: AREA.divHeight, height: AREA.divHeight }
132
- }
133
-
134
- const AreaModel = ({ top, side, center, colors }: AreaModelProps) => {
135
- const { width, height } = areaDims(top, side)
136
-
137
- // Two aligned rows with a matched side column on BOTH sides of the rect, so the
138
- // rect is centered horizontally: the side label sits in the left column, an
139
- // equal-width spacer balances the right. The top label box matches the rect
140
- // width so it centers over the rect.
141
- return (
142
- <View style={styles.areaContainer}>
143
- <View style={styles.areaRow}>
144
- <View style={styles.sideCol} />
145
- <View style={[styles.topCol, { width }]}>
146
- <Dimension value={top} colors={colors} />
147
- </View>
148
- <View style={styles.sideCol} />
149
- </View>
150
- <View style={styles.areaRow}>
151
- <View style={[styles.sideCol, styles.sideLabel]}>
152
- <Dimension value={side} colors={colors} />
153
- </View>
154
- <View
155
- style={[styles.rect, { width, height, borderColor: colors.accent, backgroundColor: colors.bg }]}
156
- >
157
- <Dimension value={center} colors={colors} large />
158
- </View>
159
- <View style={styles.sideCol} />
160
- </View>
161
- </View>
162
- )
163
- }
164
-
165
- type DimensionProps = {
166
- value: NodeValue
167
- colors: VisualColors
168
- large?: boolean
169
- }
170
-
171
- const Dimension = ({ value, colors, large = false }: DimensionProps) => {
172
- const isUnknown = value === null
173
- return (
174
- <Typography
175
- style={[styles.dimText, large && styles.dimTextLarge, { color: isUnknown ? colors.accent : colors.dark }]}
176
- >
177
- {isUnknown ? '?' : value}
178
- </Typography>
179
- )
180
- }
181
-
182
- const styles = StyleSheet.create({
183
- bondWrapper: {
184
- // Size by HEIGHT so the bond fits the short visual zone (card 260 → flex-4
185
- // zone ≈104px − padding ≈88px content); width follows the viewBox ratio.
186
- // Width-driven sizing overshot because the zone is wide but short.
187
- height: 84,
188
- aspectRatio: VB_W / VB_H,
189
- alignSelf: 'center',
190
- },
191
- areaContainer: {
192
- alignItems: 'center',
193
- justifyContent: 'center',
194
- gap: SPACING[100],
195
- },
196
- areaRow: {
197
- flexDirection: 'row',
198
- alignItems: 'center',
199
- gap: SPACING[200],
200
- },
201
- sideCol: {
202
- width: 32,
203
- },
204
- sideLabel: {
205
- alignItems: 'flex-end',
206
- justifyContent: 'center',
207
- },
208
- topCol: {
209
- alignItems: 'center',
210
- },
211
- rect: {
212
- borderWidth: 2,
213
- borderRadius: BORDER_RADIUS[200],
214
- alignItems: 'center',
215
- justifyContent: 'center',
216
- },
217
- dimText: {
218
- fontSize: 17,
219
- fontWeight: '700',
220
- fontFamily: FONT_FAMILY.buenosAires,
221
- },
222
- dimTextLarge: {
223
- fontSize: 24,
224
- },
225
- })
@@ -1,45 +0,0 @@
1
- import { COLORS } from '@magmamath/react-native-ui'
2
- import type { Operation } from '../types'
3
-
4
- /**
5
- * Per-operation color set (spec §6):
6
- * accent → dots / lines / fills
7
- * bg → the tinted visual-zone background (lightest tint)
8
- * mid → the "second" quantity (2nd addend, dashed group outline)
9
- * dark → small text labels (number-line tick/jump captions)
10
- */
11
- export type VisualColors = {
12
- accent: string
13
- bg: string
14
- mid: string
15
- dark: string
16
- }
17
-
18
- export const VISUAL_COLORS: Record<Operation, VisualColors> = {
19
- addition: {
20
- accent: COLORS.PRIMARY_GREEN,
21
- bg: COLORS.GREEN_1,
22
- // Second addend: a darker green than the first so the tokens stay legible
23
- // (GREEN_3 was too light against the frame).
24
- mid: COLORS.GREEN_6,
25
- dark: COLORS.GREEN_7,
26
- },
27
- subtraction: {
28
- accent: COLORS.PRIMARY_ORANGE,
29
- bg: COLORS.ORANGE_1,
30
- mid: COLORS.ORANGE_3,
31
- dark: COLORS.ORANGE_7,
32
- },
33
- multiplication: {
34
- accent: COLORS.PRIMARY_BLUE,
35
- bg: COLORS.BLUE_1,
36
- mid: COLORS.BLUE_3,
37
- dark: COLORS.BLUE_7,
38
- },
39
- division: {
40
- accent: COLORS.PRIMARY_PURPLE,
41
- bg: COLORS.PURPLE_1,
42
- mid: COLORS.PURPLE_3,
43
- dark: COLORS.PURPLE_7,
44
- },
45
- }
@@ -1,5 +0,0 @@
1
- export * from './types'
2
- export { renderFact, hasVisual, levelForBox, TEN_FRAME_CAPACITY } from './renderFact'
3
- export { FactVisual } from './components/FactVisual'
4
- export { VISUAL_COLORS } from './components/visualColors'
5
- export { toFactPresentation } from './adapter'
@@ -1,219 +0,0 @@
1
- /**
2
- * Pure renderer core for the Unified Math Fact Fluency Visual Engine.
3
- *
4
- * box → level (levelForBox)
5
- * level → component (L1 grid, L2 relational, L3 line, L4/L5 none)
6
- * operation → component variant + layout data
7
- *
8
- * Everything is derived; nothing is persisted. `renderFact` is pure so it can
9
- * be snapshot-tested in isolation from React.
10
- */
11
- import type {
12
- BarSpec,
13
- FactPresentation,
14
- GridLayout,
15
- GridSpec,
16
- Level,
17
- LineJump,
18
- LineSpec,
19
- NoVisualSpec,
20
- Operation,
21
- RelationalModel,
22
- RelationalSpec,
23
- VisualSpec,
24
- } from './types'
25
-
26
- export const TEN_FRAME_CAPACITY = 10
27
- const MINUS = '−' // U+2212
28
-
29
- /** box → level. Five boxes map one-to-one onto the five engine levels. */
30
- export function levelForBox(box: number): Level {
31
- switch (box) {
32
- case 0:
33
- return 'L1'
34
- case 1:
35
- return 'L2'
36
- case 2:
37
- return 'L3'
38
- case 3:
39
- return 'L4'
40
- default:
41
- return 'L5'
42
- }
43
- }
44
-
45
- /** Coerce to a safe non-negative integer for layout math. */
46
- const toCount = (n: number): number => (Number.isFinite(n) && n > 0 ? Math.floor(n) : 0)
47
-
48
- /** Multiples of ten strictly between `lo` and `hi`, ascending. */
49
- const tensBetween = (lo: number, hi: number): number[] => {
50
- const out: number[] = []
51
- for (let t = Math.floor(lo / TEN_FRAME_CAPACITY) * TEN_FRAME_CAPACITY + TEN_FRAME_CAPACITY; t < hi; t += TEN_FRAME_CAPACITY) {
52
- out.push(t)
53
- }
54
- return out
55
- }
56
-
57
- /** Consecutive [from, to] pairs over a list of stops. */
58
- const pairs = (xs: number[]): Array<[number, number]> => xs.slice(1).map((x, i) => [xs[i], x])
59
-
60
- const uniqueAsc = (xs: number[]): number[] => [...new Set(xs)].sort((x, y) => x - y)
61
-
62
- type BaseFields = { operation: Operation; left: number; right: number; level: Level }
63
-
64
- // ── L1: DiscreteCounterGrid ─────────────────────────────────────────────────
65
-
66
- function buildGrid(operation: Operation, left: number, right: number, base: BaseFields): GridSpec {
67
- const a = toCount(left)
68
- const b = toCount(right)
69
-
70
- const layout = ((): GridLayout => {
71
- switch (operation) {
72
- case 'addition':
73
- return { type: 'tenframes', a, b, capacity: TEN_FRAME_CAPACITY }
74
- case 'subtraction':
75
- return {
76
- type: 'tenframes_takeaway',
77
- total: a,
78
- removed: Math.min(b, a),
79
- capacity: TEN_FRAME_CAPACITY,
80
- }
81
- case 'multiplication':
82
- // 3×4 shown as 3 groups of 4 (first factor = number of groups), mirroring
83
- // the division grouping so multiplication also reads as equal groups.
84
- return { type: 'groups', groupCount: a, perGroup: b }
85
- case 'division':
86
- // 12 ÷ 4 → 3 clusters of 4: quotient groups, each holding the divisor.
87
- return { type: 'groups', groupCount: b > 0 ? Math.floor(a / b) : 0, perGroup: b }
88
- }
89
- })()
90
-
91
- return { ...base, kind: 'grid', layout }
92
- }
93
-
94
- // ── L2: RelationalBlock ─────────────────────────────────────────────────────
95
-
96
- function buildRelational(
97
- operation: Operation,
98
- left: number,
99
- right: number,
100
- base: BaseFields,
101
- ): RelationalSpec {
102
- const model = ((): RelationalModel => {
103
- switch (operation) {
104
- case 'addition':
105
- // whole (sum) unknown on top; addends below.
106
- return { type: 'bond', top: null, bottomLeft: left, bottomRight: right }
107
- case 'subtraction':
108
- // minuend whole on top; one part (the difference) unknown.
109
- return { type: 'bond', top: left, bottomLeft: right, bottomRight: null }
110
- case 'multiplication':
111
- // both dimensions known; product (center) unknown. First factor is the
112
- // number of rows (vertical side) to match the L1 array — "3×4" = 3 rows
113
- // of 4, so left drives height (side), right drives width (top).
114
- return { type: 'area', top: right, side: left, center: null }
115
- case 'division':
116
- // dividend (product) and divisor known; missing side dimension.
117
- return { type: 'area', top: right, side: null, center: left }
118
- }
119
- })()
120
-
121
- return { ...base, kind: 'relational', model }
122
- }
123
-
124
- // ── L3: DynamicNumberLine — add/sub bridge through every ten; mult skip-counts ─
125
-
126
- function buildLine(
127
- operation: Exclude<Operation, 'division'>,
128
- left: number,
129
- right: number,
130
- base: BaseFields,
131
- ): LineSpec {
132
- const a = toCount(left)
133
- const b = toCount(right)
134
-
135
- if (operation === 'addition') {
136
- const sum = a + b
137
- // Bridge through EVERY ten: 8 + 15 → 8→10→20→23 (make-a-ten, repeated).
138
- const stops = [a, ...tensBetween(a, sum), sum]
139
- const jumps: LineJump[] = pairs(stops).map(([from, to]) => ({
140
- from,
141
- to,
142
- label: `+${to - from}`,
143
- }))
144
- const ticks = uniqueAsc([0, ...stops])
145
- return { ...base, kind: 'line', lo: 0, hi: sum, ticks, jumps, hiddenTick: sum }
146
- }
147
-
148
- if (operation === 'subtraction') {
149
- const diff = a - b
150
- // Step back through every ten: 23 − 15 → 23→20→10→8.
151
- const stopsDesc = [a, ...tensBetween(diff, a).reverse(), diff]
152
- const jumps: LineJump[] = pairs(stopsDesc).map(([from, to]) => ({
153
- from,
154
- to,
155
- label: `${MINUS}${from - to}`,
156
- }))
157
- const ticks = uniqueAsc([diff, ...tensBetween(diff, a), a])
158
- return { ...base, kind: 'line', lo: diff, hi: a, ticks, jumps, hiddenTick: diff }
159
- }
160
-
161
- // multiplication: skip-count — a hops of b up to the product.
162
- const total = a * b
163
- const jumps: LineJump[] = Array.from({ length: a }, (_, i) => ({
164
- from: i * b,
165
- to: (i + 1) * b,
166
- label: `+${b}`,
167
- }))
168
- const ticks = Array.from({ length: a + 1 }, (_, i) => i * b)
169
- return { ...base, kind: 'line', lo: 0, hi: total, ticks, jumps, hiddenTick: total }
170
- }
171
-
172
- // ── L2 (division): QuotativeBars ─────────────────────────────────────────────
173
-
174
- // Quotative division: the dividend as a bar split into equal groups of the
175
- // divisor; the count of groups (quotient) is the answer the student reads off.
176
- function buildBars(left: number, right: number, base: BaseFields): BarSpec {
177
- const total = toCount(left)
178
- const segment = toCount(right)
179
- const segmentCount = segment > 0 ? Math.floor(total / segment) : 0
180
- return { ...base, kind: 'bars', total, segment, segmentCount }
181
- }
182
-
183
- function buildNone(base: BaseFields): NoVisualSpec {
184
- return { ...base, kind: 'none' }
185
- }
186
-
187
- /**
188
- * Single entry point the card calls. Returns the visual spec for the current
189
- * fact at its current box. The symbolic equation is rendered separately and is
190
- * always present.
191
- */
192
- export function renderFact(p: FactPresentation): VisualSpec {
193
- const level = levelForBox(p.box)
194
- const base: BaseFields = { operation: p.operation, left: p.left, right: p.right, level }
195
-
196
- switch (level) {
197
- case 'L1':
198
- return buildGrid(p.operation, p.left, p.right, base)
199
- case 'L2':
200
- // Division → concrete quotative bar; multiplication → number line
201
- // (skip-count); addition/subtraction → number bond.
202
- if (p.operation === 'division') return buildBars(p.left, p.right, base)
203
- if (p.operation === 'multiplication') return buildLine(p.operation, p.left, p.right, base)
204
- return buildRelational(p.operation, p.left, p.right, base)
205
- case 'L3':
206
- // Addition/subtraction → number line; multiplication/division → area model.
207
- if (p.operation === 'addition' || p.operation === 'subtraction')
208
- return buildLine(p.operation, p.left, p.right, base)
209
- return buildRelational(p.operation, p.left, p.right, base)
210
- case 'L4':
211
- case 'L5':
212
- return buildNone(base)
213
- }
214
- }
215
-
216
- /** Whether the fact has any visual scaffold at its current box (false at L4/L5). */
217
- export function hasVisual(p: FactPresentation): boolean {
218
- return renderFact(p).kind !== 'none'
219
- }
@@ -1,108 +0,0 @@
1
- /**
2
- * Unified Math Fact Fluency Visual Engine — pure data contract.
3
- *
4
- * Three polymorphic components render the visual scaffold, chosen by the
5
- * student's level (derived from the Leitner box). Each component mutates by
6
- * operation. These types describe *what to draw* — never pixels — so the same
7
- * spec drives the real RN UI and the snapshot test harness.
8
- *
9
- * L1 → DiscreteCounterGrid (discrete quantities)
10
- * L2 → RelationalBlock (part-whole structures)
11
- * L3 → DynamicNumberLine (forward jumps)
12
- * L4 → PureEquationText (plain text; hint deferred)
13
- * L5 → PureEquationText (plain text only)
14
- */
15
-
16
- export type Operation = 'addition' | 'subtraction' | 'multiplication' | 'division'
17
-
18
- export type Level = 'L1' | 'L2' | 'L3' | 'L4' | 'L5'
19
-
20
- /** Operands in the ORDER presented to the student (already direction-resolved). */
21
- export type FactPresentation = {
22
- operation: Operation
23
- left: number
24
- right: number
25
- box: 0 | 1 | 2 | 3 | 4
26
- }
27
-
28
- type BaseVisualSpec = {
29
- operation: Operation
30
- left: number
31
- right: number
32
- level: Level
33
- }
34
-
35
- // ── L1: DiscreteCounterGrid ─────────────────────────────────────────────────
36
-
37
- /** A ten-frame token tone: first set, second set, or taken-away. */
38
- export type TokenTone = 'a' | 'b' | 'gone'
39
-
40
- export type GridLayout =
41
- // Addition: two ten-frames, `a` tone-A tokens + `b` tone-B tokens.
42
- | { type: 'tenframes'; a: number; b: number; capacity: number }
43
- // Subtraction: fill `total` tokens across two ten-frames, strike the last `removed`.
44
- | { type: 'tenframes_takeaway'; total: number; removed: number; capacity: number }
45
- // Multiplication: a `rows` × `cols` dot array.
46
- | { type: 'array'; rows: number; cols: number }
47
- // Division: `groupCount` bordered clusters, each holding `perGroup` tokens.
48
- | { type: 'groups'; groupCount: number; perGroup: number }
49
-
50
- export type GridSpec = BaseVisualSpec & {
51
- kind: 'grid'
52
- layout: GridLayout
53
- }
54
-
55
- // ── L2: RelationalBlock ─────────────────────────────────────────────────────
56
-
57
- /** A node/dimension value, or null for the unknown (rendered as a placeholder). */
58
- export type NodeValue = number | null
59
-
60
- export type RelationalModel =
61
- // Number bond (add/sub): whole on top, two parts below.
62
- | { type: 'bond'; top: NodeValue; bottomLeft: NodeValue; bottomRight: NodeValue }
63
- // Area model (mult/div): top + left dimensions, product inside.
64
- | { type: 'area'; top: NodeValue; side: NodeValue; center: NodeValue }
65
-
66
- export type RelationalSpec = BaseVisualSpec & {
67
- kind: 'relational'
68
- model: RelationalModel
69
- }
70
-
71
- // ── L3: DynamicNumberLine ───────────────────────────────────────────────────
72
-
73
- export type LineJump = {
74
- from: number
75
- to: number
76
- label: string
77
- }
78
-
79
- export type LineSpec = BaseVisualSpec & {
80
- kind: 'line'
81
- lo: number
82
- hi: number
83
- ticks: number[]
84
- jumps: LineJump[]
85
- /** Tick value whose label is masked as "?" (the answer), or null to label all. */
86
- hiddenTick: number | null
87
- }
88
-
89
- // ── L2 (division): QuotativeBars ─────────────────────────────────────────────
90
-
91
- /**
92
- * Quotative ("measurement") division: the dividend laid out as a bar cut into
93
- * equal segments of `segment` (the divisor); the student counts the segments,
94
- * and that count (`segmentCount`, the quotient) is the answer.
95
- */
96
- export type BarSpec = BaseVisualSpec & {
97
- kind: 'bars'
98
- total: number
99
- segment: number
100
- segmentCount: number
101
- }
102
-
103
- // ── L4 / L5: no visual ──────────────────────────────────────────────────────
104
-
105
- export type NoVisualSpec = BaseVisualSpec & { kind: 'none' }
106
-
107
- /** Discriminated union the views switch on. */
108
- export type VisualSpec = GridSpec | RelationalSpec | LineSpec | BarSpec | NoVisualSpec