@magmamath/students-features 1.8.0 → 1.8.1-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.
- package/dist/commonjs/features/fluency/components/FluencySolving.js +2 -2
- package/dist/commonjs/features/fluency/components/FluencySolving.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/DebugBoxIndicator.js +48 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/components/DebugBoxIndicator.js.map +1 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/components/EquationContent.js +9 -8
- package/dist/commonjs/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.js +3 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.js +63 -10
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js +10 -0
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js.map +1 -1
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js +0 -2
- package/dist/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js.map +1 -1
- package/dist/commonjs/features/fluency/index.js +12 -0
- package/dist/commonjs/features/fluency/index.js.map +1 -1
- package/dist/commonjs/features/fluency/visual-scaffolding/adapter.js +36 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/adapter.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.js +232 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/Dot.js +51 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/Dot.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/DynamicNumberLine.js +104 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/DynamicNumberLine.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/FactVisual.js +75 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/FactVisual.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/QuotativeBars.js +91 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/QuotativeBars.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/RelationalBlock.js +279 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/RelationalBlock.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/visualColors.js +44 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/components/visualColors.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/index.js +73 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/index.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/renderFact.js +276 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/renderFact.js.map +1 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/types.js +2 -0
- package/dist/commonjs/features/fluency/visual-scaffolding/types.js.map +1 -0
- package/dist/commonjs/features/fluency-teacher/assets/{DivisionIcon.js → SortDefaultIcon.js} +8 -11
- package/dist/commonjs/features/fluency-teacher/assets/SortDefaultIcon.js.map +1 -0
- package/dist/commonjs/features/fluency-teacher/components/FluencyTeacher.js +3 -4
- package/dist/commonjs/features/fluency-teacher/components/FluencyTeacher.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerHeader.js +43 -48
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerHeader.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerMasteryLegend.js +80 -0
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerMasteryLegend.js.map +1 -0
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerMatrixes.js +28 -11
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerMatrixes.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorBox.js +44 -27
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorBox.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.js +40 -47
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerStats.js +24 -14
- package/dist/commonjs/features/fluency-teacher/components/drawer/DrawerStats.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.js +6 -6
- package/dist/commonjs/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/matrix/DrawerMatrix.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixCell.js +16 -2
- package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixCell.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixRow.js +2 -1
- package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixRow.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/AllPupilsTableRow.js +41 -15
- package/dist/commonjs/features/fluency-teacher/components/table/AllPupilsTableRow.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/AverageSortButton.js +62 -6
- package/dist/commonjs/features/fluency-teacher/components/table/AverageSortButton.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js +40 -42
- package/dist/commonjs/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/OperatorBadge.js +16 -25
- package/dist/commonjs/features/fluency-teacher/components/table/OperatorBadge.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.js +40 -30
- package/dist/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/TableRow.js +72 -59
- package/dist/commonjs/features/fluency-teacher/components/table/TableRow.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/components/table/TableRowAverageProgress.js +71 -0
- package/dist/commonjs/features/fluency-teacher/components/table/TableRowAverageProgress.js.map +1 -0
- package/dist/commonjs/features/fluency-teacher/context/TeacherFluencyContext.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/fluencyTeacher.constants.js +38 -103
- package/dist/commonjs/features/fluency-teacher/fluencyTeacher.constants.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/fluencyTeacher.helpers.js +10 -52
- package/dist/commonjs/features/fluency-teacher/fluencyTeacher.helpers.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/hooks/useDrawerGrid.js +2 -3
- package/dist/commonjs/features/fluency-teacher/hooks/useDrawerGrid.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/hooks/useDrawerMatrix.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.js +1 -2
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.js.map +1 -1
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyModel.js +0 -9
- package/dist/commonjs/features/fluency-teacher/model/TeacherFluencyModel.js.map +1 -1
- package/dist/module/features/fluency/components/FluencySolving.js +2 -2
- package/dist/module/features/fluency/components/FluencySolving.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/DebugBoxIndicator.js +43 -0
- package/dist/module/features/fluency/components/fluency-solving/components/DebugBoxIndicator.js.map +1 -0
- package/dist/module/features/fluency/components/fluency-solving/components/EquationContent.js +9 -8
- package/dist/module/features/fluency/components/fluency-solving/components/EquationContent.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.js +3 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.js +64 -11
- package/dist/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js +10 -0
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.js.map +1 -1
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js +0 -2
- package/dist/module/features/fluency/components/fluency-solving/components/FluencySolvingProgress.js.map +1 -1
- package/dist/module/features/fluency/index.js +1 -0
- package/dist/module/features/fluency/index.js.map +1 -1
- package/dist/module/features/fluency/visual-scaffolding/adapter.js +31 -0
- package/dist/module/features/fluency/visual-scaffolding/adapter.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.js +225 -0
- package/dist/module/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/components/Dot.js +45 -0
- package/dist/module/features/fluency/visual-scaffolding/components/Dot.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/components/DynamicNumberLine.js +96 -0
- package/dist/module/features/fluency/visual-scaffolding/components/DynamicNumberLine.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/components/FactVisual.js +69 -0
- package/dist/module/features/fluency/visual-scaffolding/components/FactVisual.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/components/QuotativeBars.js +83 -0
- package/dist/module/features/fluency/visual-scaffolding/components/QuotativeBars.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/components/RelationalBlock.js +272 -0
- package/dist/module/features/fluency/visual-scaffolding/components/RelationalBlock.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/components/visualColors.js +41 -0
- package/dist/module/features/fluency/visual-scaffolding/components/visualColors.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/index.js +8 -0
- package/dist/module/features/fluency/visual-scaffolding/index.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/renderFact.js +269 -0
- package/dist/module/features/fluency/visual-scaffolding/renderFact.js.map +1 -0
- package/dist/module/features/fluency/visual-scaffolding/types.js +2 -0
- package/dist/module/features/fluency/visual-scaffolding/types.js.map +1 -0
- package/dist/module/features/fluency-teacher/assets/SortDefaultIcon.js +23 -0
- package/dist/module/features/fluency-teacher/assets/SortDefaultIcon.js.map +1 -0
- package/dist/module/features/fluency-teacher/components/FluencyTeacher.js +3 -4
- package/dist/module/features/fluency-teacher/components/FluencyTeacher.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/drawer/DrawerHeader.js +44 -49
- package/dist/module/features/fluency-teacher/components/drawer/DrawerHeader.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/drawer/DrawerMasteryLegend.js +74 -0
- package/dist/module/features/fluency-teacher/components/drawer/DrawerMasteryLegend.js.map +1 -0
- package/dist/module/features/fluency-teacher/components/drawer/DrawerMatrixes.js +31 -14
- package/dist/module/features/fluency-teacher/components/drawer/DrawerMatrixes.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/drawer/DrawerOperatorBox.js +45 -28
- package/dist/module/features/fluency-teacher/components/drawer/DrawerOperatorBox.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.js +41 -48
- package/dist/module/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/drawer/DrawerStats.js +27 -17
- package/dist/module/features/fluency-teacher/components/drawer/DrawerStats.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.js +6 -6
- package/dist/module/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/matrix/DrawerMatrix.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/matrix/MatrixCell.js +17 -3
- package/dist/module/features/fluency-teacher/components/matrix/MatrixCell.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/matrix/MatrixRow.js +2 -1
- package/dist/module/features/fluency-teacher/components/matrix/MatrixRow.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/AllPupilsTableRow.js +42 -16
- package/dist/module/features/fluency-teacher/components/table/AllPupilsTableRow.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/AverageSortButton.js +63 -7
- package/dist/module/features/fluency-teacher/components/table/AverageSortButton.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js +42 -44
- package/dist/module/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/OperatorBadge.js +16 -25
- package/dist/module/features/fluency-teacher/components/table/OperatorBadge.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/TableColumnSortButton.js +42 -32
- package/dist/module/features/fluency-teacher/components/table/TableColumnSortButton.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/TableRow.js +75 -62
- package/dist/module/features/fluency-teacher/components/table/TableRow.js.map +1 -1
- package/dist/module/features/fluency-teacher/components/table/TableRowAverageProgress.js +65 -0
- package/dist/module/features/fluency-teacher/components/table/TableRowAverageProgress.js.map +1 -0
- package/dist/module/features/fluency-teacher/context/TeacherFluencyContext.js.map +1 -1
- package/dist/module/features/fluency-teacher/fluencyTeacher.constants.js +37 -102
- package/dist/module/features/fluency-teacher/fluencyTeacher.constants.js.map +1 -1
- package/dist/module/features/fluency-teacher/fluencyTeacher.helpers.js +8 -43
- package/dist/module/features/fluency-teacher/fluencyTeacher.helpers.js.map +1 -1
- package/dist/module/features/fluency-teacher/hooks/useDrawerGrid.js +2 -3
- package/dist/module/features/fluency-teacher/hooks/useDrawerGrid.js.map +1 -1
- package/dist/module/features/fluency-teacher/hooks/useDrawerMatrix.js.map +1 -1
- package/dist/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.js +1 -2
- package/dist/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.js.map +1 -1
- package/dist/module/features/fluency-teacher/model/TeacherFluencyModel.js +0 -9
- package/dist/module/features/fluency-teacher/model/TeacherFluencyModel.js.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/DebugBoxIndicator.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/DebugBoxIndicator.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyCardDeck.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts +2 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/components/fluency-solving/components/FluencySolvingHeader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/index.d.ts +1 -0
- package/dist/typescript/commonjs/features/fluency/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/__tests__/renderFact.test.d.ts +2 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/__tests__/renderFact.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/adapter.d.ts +4 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/adapter.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.d.ts +10 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/Dot.d.ts +10 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/Dot.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/DynamicNumberLine.d.ts +10 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/DynamicNumberLine.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/FactVisual.d.ts +10 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/FactVisual.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/QuotativeBars.d.ts +10 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/QuotativeBars.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/RelationalBlock.d.ts +10 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/RelationalBlock.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/visualColors.d.ts +16 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/components/visualColors.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/index.d.ts +6 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/renderFact.d.ts +23 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/renderFact.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/types.d.ts +103 -0
- package/dist/typescript/commonjs/features/fluency/visual-scaffolding/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency-teacher/assets/SortDefaultIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/fluency-teacher/assets/SortDefaultIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerMasteryLegend.d.ts +3 -0
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerMasteryLegend.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerMatrixes.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorBox.d.ts +4 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorBox.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.d.ts +4 -6
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/DrawerStats.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/DrawerMatrix.d.ts +2 -3
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/DrawerMatrix.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixCell.d.ts +5 -6
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixCell.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixHeaderRow.d.ts +1 -2
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixHeaderRow.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixRow.d.ts +3 -5
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixRow.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/AllPupilsTableRow.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/AverageSortButton.d.ts +1 -2
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/AverageSortButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/OperatorBadge.d.ts +4 -5
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/OperatorBadge.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.d.ts +6 -7
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableColumnSortButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableRow.d.ts +3 -4
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableRow.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableRowAverageProgress.d.ts +7 -0
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/TableRowAverageProgress.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/fluency-teacher/context/TeacherFluencyContext.d.ts +0 -1
- package/dist/typescript/commonjs/features/fluency-teacher/context/TeacherFluencyContext.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.constants.d.ts +3 -16
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.helpers.d.ts +4 -11
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.types.d.ts +6 -35
- package/dist/typescript/commonjs/features/fluency-teacher/fluencyTeacher.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/hooks/useDrawerGrid.d.ts +12 -1
- package/dist/typescript/commonjs/features/fluency-teacher/hooks/useDrawerGrid.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/hooks/useDrawerMatrix.d.ts +3 -3
- package/dist/typescript/commonjs/features/fluency-teacher/hooks/useDrawerMatrix.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts +0 -1
- package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/fluency-teacher/model/TeacherFluencyModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/DebugBoxIndicator.d.ts +3 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/DebugBoxIndicator.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/EquationContent.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyCardDeck.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts +2 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencyEquationCard.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/components/fluency-solving/components/FluencySolvingHeader.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/index.d.ts +1 -0
- package/dist/typescript/module/features/fluency/index.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency/visual-scaffolding/__tests__/renderFact.test.d.ts +2 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/__tests__/renderFact.test.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/adapter.d.ts +4 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/adapter.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.d.ts +10 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/Dot.d.ts +10 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/Dot.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/DynamicNumberLine.d.ts +10 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/DynamicNumberLine.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/FactVisual.d.ts +10 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/FactVisual.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/QuotativeBars.d.ts +10 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/QuotativeBars.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/RelationalBlock.d.ts +10 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/RelationalBlock.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/visualColors.d.ts +16 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/components/visualColors.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/index.d.ts +6 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/index.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/renderFact.d.ts +23 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/renderFact.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/types.d.ts +103 -0
- package/dist/typescript/module/features/fluency/visual-scaffolding/types.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency-teacher/assets/SortDefaultIcon.d.ts +4 -0
- package/dist/typescript/module/features/fluency-teacher/assets/SortDefaultIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerMasteryLegend.d.ts +3 -0
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerMasteryLegend.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerMatrixes.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerOperatorBox.d.ts +4 -1
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerOperatorBox.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.d.ts +4 -6
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/drawer/DrawerStats.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/matrix/DrawerMatrix.d.ts +2 -3
- package/dist/typescript/module/features/fluency-teacher/components/matrix/DrawerMatrix.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixCell.d.ts +5 -6
- package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixCell.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixHeaderRow.d.ts +1 -2
- package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixHeaderRow.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixRow.d.ts +3 -5
- package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixRow.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/AllPupilsTableRow.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/AverageSortButton.d.ts +1 -2
- package/dist/typescript/module/features/fluency-teacher/components/table/AverageSortButton.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/OperatorBadge.d.ts +4 -5
- package/dist/typescript/module/features/fluency-teacher/components/table/OperatorBadge.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/TableColumnSortButton.d.ts +6 -7
- package/dist/typescript/module/features/fluency-teacher/components/table/TableColumnSortButton.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/TableRow.d.ts +3 -4
- package/dist/typescript/module/features/fluency-teacher/components/table/TableRow.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/TableRowAverageProgress.d.ts +7 -0
- package/dist/typescript/module/features/fluency-teacher/components/table/TableRowAverageProgress.d.ts.map +1 -0
- package/dist/typescript/module/features/fluency-teacher/context/TeacherFluencyContext.d.ts +0 -1
- package/dist/typescript/module/features/fluency-teacher/context/TeacherFluencyContext.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.constants.d.ts +3 -16
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.constants.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.helpers.d.ts +4 -11
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.types.d.ts +6 -35
- package/dist/typescript/module/features/fluency-teacher/fluencyTeacher.types.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/hooks/useDrawerGrid.d.ts +12 -1
- package/dist/typescript/module/features/fluency-teacher/hooks/useDrawerGrid.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/hooks/useDrawerMatrix.d.ts +3 -3
- package/dist/typescript/module/features/fluency-teacher/hooks/useDrawerMatrix.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts +0 -1
- package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyFiltersModel.d.ts.map +1 -1
- package/dist/typescript/module/features/fluency-teacher/model/TeacherFluencyModel.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/fluency/components/FluencySolving.tsx +2 -2
- package/src/features/fluency/components/fluency-solving/components/DebugBoxIndicator.tsx +40 -0
- package/src/features/fluency/components/fluency-solving/components/EquationContent.tsx +12 -8
- package/src/features/fluency/components/fluency-solving/components/FluencyCardDeck.tsx +6 -1
- package/src/features/fluency/components/fluency-solving/components/FluencyEquationCard.tsx +63 -11
- package/src/features/fluency/components/fluency-solving/components/FluencySolvingHeader.tsx +9 -0
- package/src/features/fluency/components/fluency-solving/components/FluencySolvingProgress.tsx +0 -2
- package/src/features/fluency/index.ts +1 -0
- package/src/features/fluency/visual-scaffolding/__tests__/__snapshots__/renderFact.test.ts.snap +64 -0
- package/src/features/fluency/visual-scaffolding/__tests__/renderFact.test.ts +192 -0
- package/src/features/fluency/visual-scaffolding/adapter.ts +33 -0
- package/src/features/fluency/visual-scaffolding/components/DiscreteCounterGrid.tsx +222 -0
- package/src/features/fluency/visual-scaffolding/components/Dot.tsx +36 -0
- package/src/features/fluency/visual-scaffolding/components/DynamicNumberLine.tsx +98 -0
- package/src/features/fluency/visual-scaffolding/components/FactVisual.tsx +61 -0
- package/src/features/fluency/visual-scaffolding/components/QuotativeBars.tsx +92 -0
- package/src/features/fluency/visual-scaffolding/components/RelationalBlock.tsx +225 -0
- package/src/features/fluency/visual-scaffolding/components/visualColors.ts +45 -0
- package/src/features/fluency/visual-scaffolding/index.ts +5 -0
- package/src/features/fluency/visual-scaffolding/renderFact.ts +219 -0
- package/src/features/fluency/visual-scaffolding/types.ts +108 -0
- package/src/features/fluency-teacher/assets/SortDefaultIcon.tsx +10 -0
- package/src/features/fluency-teacher/components/FluencyTeacher.tsx +3 -3
- package/src/features/fluency-teacher/components/drawer/DrawerHeader.tsx +35 -37
- package/src/features/fluency-teacher/components/drawer/DrawerMasteryLegend.tsx +63 -0
- package/src/features/fluency-teacher/components/drawer/DrawerMatrixes.tsx +32 -13
- package/src/features/fluency-teacher/components/drawer/DrawerOperatorBox.tsx +40 -20
- package/src/features/fluency-teacher/components/drawer/DrawerOperatorStatCard.tsx +35 -35
- package/src/features/fluency-teacher/components/drawer/DrawerStats.tsx +28 -16
- package/src/features/fluency-teacher/components/drawer/FluencyTeacherDrawer.tsx +5 -4
- package/src/features/fluency-teacher/components/matrix/DrawerMatrix.tsx +2 -3
- package/src/features/fluency-teacher/components/matrix/MatrixCell.tsx +16 -7
- package/src/features/fluency-teacher/components/matrix/MatrixHeaderRow.tsx +1 -1
- package/src/features/fluency-teacher/components/matrix/MatrixRow.tsx +4 -4
- package/src/features/fluency-teacher/components/table/AllPupilsTableRow.tsx +40 -13
- package/src/features/fluency-teacher/components/table/AverageSortButton.tsx +62 -8
- package/src/features/fluency-teacher/components/table/FluencyTeacherStudentsTable.tsx +35 -49
- package/src/features/fluency-teacher/components/table/OperatorBadge.tsx +11 -18
- package/src/features/fluency-teacher/components/table/TableColumnSortButton.tsx +49 -28
- package/src/features/fluency-teacher/components/table/TableRow.tsx +64 -65
- package/src/features/fluency-teacher/components/table/TableRowAverageProgress.tsx +65 -0
- package/src/features/fluency-teacher/context/TeacherFluencyContext.ts +0 -1
- package/src/features/fluency-teacher/fluencyTeacher.constants.ts +40 -138
- package/src/features/fluency-teacher/fluencyTeacher.helpers.ts +10 -82
- package/src/features/fluency-teacher/fluencyTeacher.types.ts +6 -39
- package/src/features/fluency-teacher/hooks/useDrawerGrid.ts +7 -4
- package/src/features/fluency-teacher/hooks/useDrawerMatrix.ts +3 -4
- package/src/features/fluency-teacher/model/TeacherFluencyFiltersModel.ts +5 -8
- package/src/features/fluency-teacher/model/TeacherFluencyModel.ts +0 -8
- package/dist/commonjs/features/fluency-teacher/assets/DivisionIcon.js.map +0 -1
- package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixLegend.js +0 -83
- package/dist/commonjs/features/fluency-teacher/components/matrix/MatrixLegend.js.map +0 -1
- package/dist/commonjs/features/fluency-teacher/components/table/AverageCell.js +0 -55
- package/dist/commonjs/features/fluency-teacher/components/table/AverageCell.js.map +0 -1
- package/dist/commonjs/features/fluency-teacher/components/table/SortOrderCarets.js +0 -40
- package/dist/commonjs/features/fluency-teacher/components/table/SortOrderCarets.js.map +0 -1
- package/dist/commonjs/features/fluency-teacher/components/table/tableCell.styles.js +0 -45
- package/dist/commonjs/features/fluency-teacher/components/table/tableCell.styles.js.map +0 -1
- package/dist/module/features/fluency-teacher/assets/DivisionIcon.js +0 -26
- package/dist/module/features/fluency-teacher/assets/DivisionIcon.js.map +0 -1
- package/dist/module/features/fluency-teacher/components/matrix/MatrixLegend.js +0 -77
- package/dist/module/features/fluency-teacher/components/matrix/MatrixLegend.js.map +0 -1
- package/dist/module/features/fluency-teacher/components/table/AverageCell.js +0 -49
- package/dist/module/features/fluency-teacher/components/table/AverageCell.js.map +0 -1
- package/dist/module/features/fluency-teacher/components/table/SortOrderCarets.js +0 -34
- package/dist/module/features/fluency-teacher/components/table/SortOrderCarets.js.map +0 -1
- package/dist/module/features/fluency-teacher/components/table/tableCell.styles.js +0 -42
- package/dist/module/features/fluency-teacher/components/table/tableCell.styles.js.map +0 -1
- package/dist/typescript/commonjs/features/fluency-teacher/assets/DivisionIcon.d.ts +0 -4
- package/dist/typescript/commonjs/features/fluency-teacher/assets/DivisionIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixLegend.d.ts +0 -10
- package/dist/typescript/commonjs/features/fluency-teacher/components/matrix/MatrixLegend.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/AverageCell.d.ts +0 -9
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/AverageCell.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/SortOrderCarets.d.ts +0 -9
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/SortOrderCarets.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/tableCell.styles.d.ts +0 -35
- package/dist/typescript/commonjs/features/fluency-teacher/components/table/tableCell.styles.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency-teacher/assets/DivisionIcon.d.ts +0 -4
- package/dist/typescript/module/features/fluency-teacher/assets/DivisionIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixLegend.d.ts +0 -10
- package/dist/typescript/module/features/fluency-teacher/components/matrix/MatrixLegend.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/AverageCell.d.ts +0 -9
- package/dist/typescript/module/features/fluency-teacher/components/table/AverageCell.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/SortOrderCarets.d.ts +0 -9
- package/dist/typescript/module/features/fluency-teacher/components/table/SortOrderCarets.d.ts.map +0 -1
- package/dist/typescript/module/features/fluency-teacher/components/table/tableCell.styles.d.ts +0 -35
- package/dist/typescript/module/features/fluency-teacher/components/table/tableCell.styles.d.ts.map +0 -1
- package/src/features/fluency-teacher/assets/DivisionIcon.tsx +0 -20
- package/src/features/fluency-teacher/components/matrix/MatrixLegend.tsx +0 -81
- package/src/features/fluency-teacher/components/table/AverageCell.tsx +0 -45
- package/src/features/fluency-teacher/components/table/SortOrderCarets.tsx +0 -37
- package/src/features/fluency-teacher/components/table/tableCell.styles.ts +0 -39
|
@@ -0,0 +1,225 @@
|
|
|
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
|
+
})
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
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'
|
|
@@ -0,0 +1,219 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import { COLORS, IconProps } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
export const SortDefaultIcon = ({ color = COLORS.NEUTRAL_9, size = 10 }: IconProps) => (
|
|
6
|
+
<Svg width={size} height={size} viewBox="0 0 10 10" fill="none">
|
|
7
|
+
<Path d="M5 1 L8 4 H2 Z" fill={color} />
|
|
8
|
+
<Path d="M5 9 L2 6 H8 Z" fill={color} />
|
|
9
|
+
</Svg>
|
|
10
|
+
)
|
|
@@ -4,10 +4,10 @@ import { View, StyleSheet } from 'react-native'
|
|
|
4
4
|
import { SPACING } from '@magmamath/react-native-ui'
|
|
5
5
|
import { TeacherFluencyModel } from '../model/TeacherFluencyModel'
|
|
6
6
|
import { FluencyTeacherStudentsTable } from './table/FluencyTeacherStudentsTable'
|
|
7
|
-
import { FluencyTeacherFooter } from './FluencyTeacherFooter'
|
|
8
7
|
import { FluencyTeacherFilters } from './table/FluencyTeacherFilters'
|
|
9
8
|
import { FluencyTeacherHeader } from './header/FluencyTeacherHeader'
|
|
10
9
|
import { FluencyTeacherDrawer } from './drawer/FluencyTeacherDrawer'
|
|
10
|
+
import { FluencyTeacherFooter } from './FluencyTeacherFooter'
|
|
11
11
|
import { FluencyStudent } from '../fluencyTeacher.types'
|
|
12
12
|
import { TeacherFluencyProvider } from '../context/TeacherFluencyContext'
|
|
13
13
|
|
|
@@ -21,13 +21,13 @@ export const FluencyTeacher = ({ model, students, grade }: FluencyTeacherProps)
|
|
|
21
21
|
useGate(model.gate, { students, grade })
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
|
-
<TeacherFluencyProvider value={{ model
|
|
24
|
+
<TeacherFluencyProvider value={{ model }}>
|
|
25
25
|
<View style={styles.container}>
|
|
26
26
|
<FluencyTeacherHeader />
|
|
27
27
|
<FluencyTeacherFilters />
|
|
28
28
|
<FluencyTeacherStudentsTable />
|
|
29
|
-
<FluencyTeacherFooter />
|
|
30
29
|
<FluencyTeacherDrawer />
|
|
30
|
+
<FluencyTeacherFooter />
|
|
31
31
|
</View>
|
|
32
32
|
</TeacherFluencyProvider>
|
|
33
33
|
)
|