@mathscan/geometry-engine 0.1.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/README.md +1101 -0
- package/dist/coordinates/grid.d.cts +8 -0
- package/dist/coordinates/grid.d.ts +9 -0
- package/dist/coordinates/grid.d.ts.map +1 -0
- package/dist/coordinates/lineClipping.d.cts +3 -0
- package/dist/coordinates/lineClipping.d.ts +4 -0
- package/dist/coordinates/lineClipping.d.ts.map +1 -0
- package/dist/coordinates/transform.d.cts +18 -0
- package/dist/coordinates/transform.d.ts +19 -0
- package/dist/coordinates/transform.d.ts.map +1 -0
- package/dist/core.cjs +1 -0
- package/dist/core.mjs +4 -0
- package/dist/entries/core.d.cts +16 -0
- package/dist/entries/core.d.ts +17 -0
- package/dist/entries/core.d.ts.map +1 -0
- package/dist/entries/react.d.cts +18 -0
- package/dist/entries/react.d.ts +19 -0
- package/dist/entries/react.d.ts.map +1 -0
- package/dist/entries/schemas.d.cts +14 -0
- package/dist/entries/schemas.d.ts +15 -0
- package/dist/entries/schemas.d.ts.map +1 -0
- package/dist/entries/validation.d.cts +12 -0
- package/dist/entries/validation.d.ts +13 -0
- package/dist/entries/validation.d.ts.map +1 -0
- package/dist/exercise.schema-BV2b7rtN.cjs +2 -0
- package/dist/exercise.schema-BV2b7rtN.cjs.map +1 -0
- package/dist/exercise.schema-ckVBW9XA.js +212 -0
- package/dist/exercise.schema-ckVBW9XA.js.map +1 -0
- package/dist/geometry/distance.d.cts +9 -0
- package/dist/geometry/distance.d.ts +10 -0
- package/dist/geometry/distance.d.ts.map +1 -0
- package/dist/geometry/entities/circle.d.cts +36 -0
- package/dist/geometry/entities/circle.d.ts +37 -0
- package/dist/geometry/entities/circle.d.ts.map +1 -0
- package/dist/geometry/entities/index.d.cts +60 -0
- package/dist/geometry/entities/index.d.ts +61 -0
- package/dist/geometry/entities/index.d.ts.map +1 -0
- package/dist/geometry/entities/line.d.cts +43 -0
- package/dist/geometry/entities/line.d.ts +44 -0
- package/dist/geometry/entities/line.d.ts.map +1 -0
- package/dist/geometry/entities/point.d.cts +27 -0
- package/dist/geometry/entities/point.d.ts +28 -0
- package/dist/geometry/entities/point.d.ts.map +1 -0
- package/dist/geometry/entities/relations.d.cts +27 -0
- package/dist/geometry/entities/relations.d.ts +28 -0
- package/dist/geometry/entities/relations.d.ts.map +1 -0
- package/dist/geometry/entities/segment.d.cts +45 -0
- package/dist/geometry/entities/segment.d.ts +46 -0
- package/dist/geometry/entities/segment.d.ts.map +1 -0
- package/dist/geometry/entityCapabilities.d.cts +2 -0
- package/dist/geometry/entityCapabilities.d.ts +3 -0
- package/dist/geometry/entityCapabilities.d.ts.map +1 -0
- package/dist/geometry/entityModel.d.cts +139 -0
- package/dist/geometry/entityModel.d.ts +140 -0
- package/dist/geometry/entityModel.d.ts.map +1 -0
- package/dist/geometry/entityRecord.d.cts +27 -0
- package/dist/geometry/entityRecord.d.ts +28 -0
- package/dist/geometry/entityRecord.d.ts.map +1 -0
- package/dist/geometry/evaluateGraph.d.cts +37 -0
- package/dist/geometry/evaluateGraph.d.ts +38 -0
- package/dist/geometry/evaluateGraph.d.ts.map +1 -0
- package/dist/geometry/geometryObject.d.cts +4 -0
- package/dist/geometry/geometryObject.d.ts +5 -0
- package/dist/geometry/geometryObject.d.ts.map +1 -0
- package/dist/geometry/goalCandidate.d.cts +8 -0
- package/dist/geometry/goalCandidate.d.ts +9 -0
- package/dist/geometry/goalCandidate.d.ts.map +1 -0
- package/dist/geometry/hitTest.d.cts +23 -0
- package/dist/geometry/hitTest.d.ts +24 -0
- package/dist/geometry/hitTest.d.ts.map +1 -0
- package/dist/geometry/point.d.cts +5 -0
- package/dist/geometry/point.d.ts +6 -0
- package/dist/geometry/point.d.ts.map +1 -0
- package/dist/geometry/pointOrigin.d.cts +5 -0
- package/dist/geometry/pointOrigin.d.ts +6 -0
- package/dist/geometry/pointOrigin.d.ts.map +1 -0
- package/dist/geometry/v1Bridge.d.cts +41 -0
- package/dist/geometry/v1Bridge.d.ts +42 -0
- package/dist/geometry/v1Bridge.d.ts.map +1 -0
- package/dist/geometryAttemptStatus-5L_q6-9l.js +184 -0
- package/dist/geometryAttemptStatus-5L_q6-9l.js.map +1 -0
- package/dist/geometryAttemptStatus-N_XHIkiS.cjs +2 -0
- package/dist/geometryAttemptStatus-N_XHIkiS.cjs.map +1 -0
- package/dist/geometryState.schema-D0ixyGYE.js +955 -0
- package/dist/geometryState.schema-D0ixyGYE.js.map +1 -0
- package/dist/geometryState.schema-DKQ-durx.cjs +2 -0
- package/dist/geometryState.schema-DKQ-durx.cjs.map +1 -0
- package/dist/goals-C3ZwbEh_.js +451 -0
- package/dist/goals-C3ZwbEh_.js.map +1 -0
- package/dist/goals-CxR5qPDC.cjs +2 -0
- package/dist/goals-CxR5qPDC.cjs.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +10 -0
- package/dist/measure/geometryAdapter.d.cts +26 -0
- package/dist/measure/geometryAdapter.d.ts +27 -0
- package/dist/measure/geometryAdapter.d.ts.map +1 -0
- package/dist/measure/kernel.d.cts +25 -0
- package/dist/measure/kernel.d.ts +26 -0
- package/dist/measure/kernel.d.ts.map +1 -0
- package/dist/numerics/policy.d.cts +17 -0
- package/dist/numerics/policy.d.ts +18 -0
- package/dist/numerics/policy.d.ts.map +1 -0
- package/dist/react-BEcdx1f6.js +1851 -0
- package/dist/react-BEcdx1f6.js.map +1 -0
- package/dist/react-Pp_VSk--.cjs +2 -0
- package/dist/react-Pp_VSk--.cjs.map +1 -0
- package/dist/react.cjs +1 -0
- package/dist/react.mjs +2 -0
- package/dist/renderer/GeometryCanvas.d.cts +14 -0
- package/dist/renderer/GeometryCanvas.d.ts +15 -0
- package/dist/renderer/GeometryCanvas.d.ts.map +1 -0
- package/dist/renderer/GeometryCompanion.d.cts +29 -0
- package/dist/renderer/GeometryCompanion.d.ts +30 -0
- package/dist/renderer/GeometryCompanion.d.ts.map +1 -0
- package/dist/renderer/GeometryGrid.d.cts +7 -0
- package/dist/renderer/GeometryGrid.d.ts +8 -0
- package/dist/renderer/GeometryGrid.d.ts.map +1 -0
- package/dist/renderer/GeometryInstruments.d.cts +7 -0
- package/dist/renderer/GeometryInstruments.d.ts +8 -0
- package/dist/renderer/GeometryInstruments.d.ts.map +1 -0
- package/dist/renderer/StudentGeometryCanvas.d.cts +11 -0
- package/dist/renderer/StudentGeometryCanvas.d.ts +12 -0
- package/dist/renderer/StudentGeometryCanvas.d.ts.map +1 -0
- package/dist/renderer/StudentGeometryExercise.d.cts +36 -0
- package/dist/renderer/StudentGeometryExercise.d.ts +37 -0
- package/dist/renderer/StudentGeometryExercise.d.ts.map +1 -0
- package/dist/renderer/Toolbar.d.cts +7 -0
- package/dist/renderer/Toolbar.d.ts +8 -0
- package/dist/renderer/Toolbar.d.ts.map +1 -0
- package/dist/renderer/deriveRenderableGeometry.d.cts +15 -0
- package/dist/renderer/deriveRenderableGeometry.d.ts +16 -0
- package/dist/renderer/deriveRenderableGeometry.d.ts.map +1 -0
- package/dist/renderer/deriveSemanticScene.d.cts +58 -0
- package/dist/renderer/deriveSemanticScene.d.ts +59 -0
- package/dist/renderer/deriveSemanticScene.d.ts.map +1 -0
- package/dist/renderer/entityDisplayName.d.cts +12 -0
- package/dist/renderer/entityDisplayName.d.ts +13 -0
- package/dist/renderer/entityDisplayName.d.ts.map +1 -0
- package/dist/renderer/gesturePolicy.d.cts +97 -0
- package/dist/renderer/gesturePolicy.d.ts +98 -0
- package/dist/renderer/gesturePolicy.d.ts.map +1 -0
- package/dist/renderer/shapes/CircleShape.d.cts +17 -0
- package/dist/renderer/shapes/CircleShape.d.ts +18 -0
- package/dist/renderer/shapes/CircleShape.d.ts.map +1 -0
- package/dist/renderer/shapes/EntityLabel.d.cts +14 -0
- package/dist/renderer/shapes/EntityLabel.d.ts +15 -0
- package/dist/renderer/shapes/EntityLabel.d.ts.map +1 -0
- package/dist/renderer/shapes/EntityShape.d.cts +18 -0
- package/dist/renderer/shapes/EntityShape.d.ts +19 -0
- package/dist/renderer/shapes/EntityShape.d.ts.map +1 -0
- package/dist/renderer/shapes/LineShape.d.cts +16 -0
- package/dist/renderer/shapes/LineShape.d.ts +17 -0
- package/dist/renderer/shapes/LineShape.d.ts.map +1 -0
- package/dist/renderer/shapes/PointShape.d.cts +17 -0
- package/dist/renderer/shapes/PointShape.d.ts +18 -0
- package/dist/renderer/shapes/PointShape.d.ts.map +1 -0
- package/dist/renderer/shapes/SegmentShape.d.cts +17 -0
- package/dist/renderer/shapes/SegmentShape.d.ts +18 -0
- package/dist/renderer/shapes/SegmentShape.d.ts.map +1 -0
- package/dist/renderer/shapes/SnapMarker.d.cts +8 -0
- package/dist/renderer/shapes/SnapMarker.d.ts +9 -0
- package/dist/renderer/shapes/SnapMarker.d.ts.map +1 -0
- package/dist/renderer/shapes/StrokedLine.d.cts +18 -0
- package/dist/renderer/shapes/StrokedLine.d.ts +19 -0
- package/dist/renderer/shapes/StrokedLine.d.ts.map +1 -0
- package/dist/renderer/studentExerciseSession.d.cts +71 -0
- package/dist/renderer/studentExerciseSession.d.ts +72 -0
- package/dist/renderer/studentExerciseSession.d.ts.map +1 -0
- package/dist/renderer/useConnectionPreview.d.cts +44 -0
- package/dist/renderer/useConnectionPreview.d.ts +45 -0
- package/dist/renderer/useConnectionPreview.d.ts.map +1 -0
- package/dist/renderer/usePlacementSnap.d.cts +28 -0
- package/dist/renderer/usePlacementSnap.d.ts +29 -0
- package/dist/renderer/usePlacementSnap.d.ts.map +1 -0
- package/dist/renderer/usePointerGestures.d.cts +46 -0
- package/dist/renderer/usePointerGestures.d.ts +47 -0
- package/dist/renderer/usePointerGestures.d.ts.map +1 -0
- package/dist/schemas/circle.schema.d.cts +8 -0
- package/dist/schemas/circle.schema.d.ts +9 -0
- package/dist/schemas/circle.schema.d.ts.map +1 -0
- package/dist/schemas/entityDefinition.schema.d.cts +69 -0
- package/dist/schemas/entityDefinition.schema.d.ts +70 -0
- package/dist/schemas/entityDefinition.schema.d.ts.map +1 -0
- package/dist/schemas/entityDocument.d.cts +95 -0
- package/dist/schemas/entityDocument.d.ts +96 -0
- package/dist/schemas/entityDocument.d.ts.map +1 -0
- package/dist/schemas/entityPresentation.schema.d.cts +12 -0
- package/dist/schemas/entityPresentation.schema.d.ts +13 -0
- package/dist/schemas/entityPresentation.schema.d.ts.map +1 -0
- package/dist/schemas/exercise.schema.d.cts +217 -0
- package/dist/schemas/exercise.schema.d.ts +218 -0
- package/dist/schemas/exercise.schema.d.ts.map +1 -0
- package/dist/schemas/exerciseProjection.d.cts +10 -0
- package/dist/schemas/exerciseProjection.d.ts +11 -0
- package/dist/schemas/exerciseProjection.d.ts.map +1 -0
- package/dist/schemas/exerciseV2.schema.d.cts +137 -0
- package/dist/schemas/exerciseV2.schema.d.ts +138 -0
- package/dist/schemas/exerciseV2.schema.d.ts.map +1 -0
- package/dist/schemas/exerciseV3.schema.d.cts +149 -0
- package/dist/schemas/exerciseV3.schema.d.ts +150 -0
- package/dist/schemas/exerciseV3.schema.d.ts.map +1 -0
- package/dist/schemas/geometryObject.schema.d.cts +17 -0
- package/dist/schemas/geometryObject.schema.d.ts +18 -0
- package/dist/schemas/geometryObject.schema.d.ts.map +1 -0
- package/dist/schemas/geometryState.schema.d.cts +64 -0
- package/dist/schemas/geometryState.schema.d.ts +65 -0
- package/dist/schemas/geometryState.schema.d.ts.map +1 -0
- package/dist/schemas/givenElement.schema.d.cts +24 -0
- package/dist/schemas/givenElement.schema.d.ts +25 -0
- package/dist/schemas/givenElement.schema.d.ts.map +1 -0
- package/dist/schemas/goals/createGoal.schema.d.cts +12 -0
- package/dist/schemas/goals/createGoal.schema.d.ts +13 -0
- package/dist/schemas/goals/createGoal.schema.d.ts.map +1 -0
- package/dist/schemas/goals/geometryGoal.schema.d.cts +58 -0
- package/dist/schemas/goals/geometryGoal.schema.d.ts +59 -0
- package/dist/schemas/goals/geometryGoal.schema.d.ts.map +1 -0
- package/dist/schemas/goals/goalKindDeclaration.d.cts +53 -0
- package/dist/schemas/goals/goalKindDeclaration.d.ts +54 -0
- package/dist/schemas/goals/goalKindDeclaration.d.ts.map +1 -0
- package/dist/schemas/goals/midpointGoal.schema.d.cts +9 -0
- package/dist/schemas/goals/midpointGoal.schema.d.ts +10 -0
- package/dist/schemas/goals/midpointGoal.schema.d.ts.map +1 -0
- package/dist/schemas/goals/parallelGoal.schema.d.cts +15 -0
- package/dist/schemas/goals/parallelGoal.schema.d.ts +16 -0
- package/dist/schemas/goals/parallelGoal.schema.d.ts.map +1 -0
- package/dist/schemas/goals/perpendicularGoal.schema.d.cts +15 -0
- package/dist/schemas/goals/perpendicularGoal.schema.d.ts +16 -0
- package/dist/schemas/goals/perpendicularGoal.schema.d.ts.map +1 -0
- package/dist/schemas/goals/segmentLengthGoal.schema.d.cts +9 -0
- package/dist/schemas/goals/segmentLengthGoal.schema.d.ts +10 -0
- package/dist/schemas/goals/segmentLengthGoal.schema.d.ts.map +1 -0
- package/dist/schemas/goals/throughPointsGoal.schema.d.cts +13 -0
- package/dist/schemas/goals/throughPointsGoal.schema.d.ts +14 -0
- package/dist/schemas/goals/throughPointsGoal.schema.d.ts.map +1 -0
- package/dist/schemas/identifier.schema.d.cts +2 -0
- package/dist/schemas/identifier.schema.d.ts +3 -0
- package/dist/schemas/identifier.schema.d.ts.map +1 -0
- package/dist/schemas/line.schema.d.cts +7 -0
- package/dist/schemas/line.schema.d.ts +8 -0
- package/dist/schemas/line.schema.d.ts.map +1 -0
- package/dist/schemas/migrate.d.cts +21 -0
- package/dist/schemas/migrate.d.ts +22 -0
- package/dist/schemas/migrate.d.ts.map +1 -0
- package/dist/schemas/objectTypeName.schema.d.cts +8 -0
- package/dist/schemas/objectTypeName.schema.d.ts +9 -0
- package/dist/schemas/objectTypeName.schema.d.ts.map +1 -0
- package/dist/schemas/point.schema.d.cts +15 -0
- package/dist/schemas/point.schema.d.ts +16 -0
- package/dist/schemas/point.schema.d.ts.map +1 -0
- package/dist/schemas/pointOrigin.schema.d.cts +25 -0
- package/dist/schemas/pointOrigin.schema.d.ts +26 -0
- package/dist/schemas/pointOrigin.schema.d.ts.map +1 -0
- package/dist/schemas/segment.schema.d.cts +8 -0
- package/dist/schemas/segment.schema.d.ts +9 -0
- package/dist/schemas/segment.schema.d.ts.map +1 -0
- package/dist/schemas/v1ToV2.d.cts +37 -0
- package/dist/schemas/v1ToV2.d.ts +38 -0
- package/dist/schemas/v1ToV2.d.ts.map +1 -0
- package/dist/schemas/v2ToV3.d.cts +37 -0
- package/dist/schemas/v2ToV3.d.ts +38 -0
- package/dist/schemas/v2ToV3.d.ts.map +1 -0
- package/dist/schemas/v3ToV4.d.cts +3 -0
- package/dist/schemas/v3ToV4.d.ts +4 -0
- package/dist/schemas/v3ToV4.d.ts.map +1 -0
- package/dist/schemas/viewport.schema.d.cts +3 -0
- package/dist/schemas/viewport.schema.d.ts +4 -0
- package/dist/schemas/viewport.schema.d.ts.map +1 -0
- package/dist/schemas.cjs +1 -0
- package/dist/schemas.mjs +3 -0
- package/dist/snapping/computeSnap.d.cts +30 -0
- package/dist/snapping/computeSnap.d.ts +31 -0
- package/dist/snapping/computeSnap.d.ts.map +1 -0
- package/dist/state/geometryContext.d.cts +40 -0
- package/dist/state/geometryContext.d.ts +41 -0
- package/dist/state/geometryContext.d.ts.map +1 -0
- package/dist/state/resolvePoints.d.cts +51 -0
- package/dist/state/resolvePoints.d.ts +52 -0
- package/dist/state/resolvePoints.d.ts.map +1 -0
- package/dist/store/attemptChange.d.cts +30 -0
- package/dist/store/attemptChange.d.ts +31 -0
- package/dist/store/attemptChange.d.ts.map +1 -0
- package/dist/store/constructionCommand.d.cts +35 -0
- package/dist/store/constructionCommand.d.ts +36 -0
- package/dist/store/constructionCommand.d.ts.map +1 -0
- package/dist/store/constructionIdentity.d.cts +21 -0
- package/dist/store/constructionIdentity.d.ts +22 -0
- package/dist/store/constructionIdentity.d.ts.map +1 -0
- package/dist/store/createStore.d.cts +6 -0
- package/dist/store/createStore.d.ts +7 -0
- package/dist/store/createStore.d.ts.map +1 -0
- package/dist/store/history.d.cts +2 -0
- package/dist/store/history.d.ts +3 -0
- package/dist/store/history.d.ts.map +1 -0
- package/dist/store/studentStore.d.cts +151 -0
- package/dist/store/studentStore.d.ts +152 -0
- package/dist/store/studentStore.d.ts.map +1 -0
- package/dist/store/teacherStore.d.cts +111 -0
- package/dist/store/teacherStore.d.ts +112 -0
- package/dist/store/teacherStore.d.ts.map +1 -0
- package/dist/store/useStoreState.d.cts +2 -0
- package/dist/store/useStoreState.d.ts +3 -0
- package/dist/store/useStoreState.d.ts.map +1 -0
- package/dist/studentStore-CEKTtMCh.js +1162 -0
- package/dist/studentStore-CEKTtMCh.js.map +1 -0
- package/dist/studentStore-DLftfFAl.cjs +2 -0
- package/dist/studentStore-DLftfFAl.cjs.map +1 -0
- package/dist/validation/checkGeometryAnswer.d.cts +63 -0
- package/dist/validation/checkGeometryAnswer.d.ts +64 -0
- package/dist/validation/checkGeometryAnswer.d.ts.map +1 -0
- package/dist/validation/deriveGeometryCanvasFeedback.d.cts +7 -0
- package/dist/validation/deriveGeometryCanvasFeedback.d.ts +8 -0
- package/dist/validation/deriveGeometryCanvasFeedback.d.ts.map +1 -0
- package/dist/validation/exerciseLoad.d.cts +29 -0
- package/dist/validation/exerciseLoad.d.ts +30 -0
- package/dist/validation/exerciseLoad.d.ts.map +1 -0
- package/dist/validation/geometryAttemptStatus.d.cts +23 -0
- package/dist/validation/geometryAttemptStatus.d.ts +24 -0
- package/dist/validation/geometryAttemptStatus.d.ts.map +1 -0
- package/dist/validation/getGeometryExerciseWarnings.d.cts +16 -0
- package/dist/validation/getGeometryExerciseWarnings.d.ts +17 -0
- package/dist/validation/getGeometryExerciseWarnings.d.ts.map +1 -0
- package/dist/validation/goals/create.d.cts +3 -0
- package/dist/validation/goals/create.d.ts +4 -0
- package/dist/validation/goals/create.d.ts.map +1 -0
- package/dist/validation/goals/goalContext.d.cts +44 -0
- package/dist/validation/goals/goalContext.d.ts +45 -0
- package/dist/validation/goals/goalContext.d.ts.map +1 -0
- package/dist/validation/goals/goalKindHandler.d.cts +26 -0
- package/dist/validation/goals/goalKindHandler.d.ts +27 -0
- package/dist/validation/goals/goalKindHandler.d.ts.map +1 -0
- package/dist/validation/goals/index.d.cts +14 -0
- package/dist/validation/goals/index.d.ts +15 -0
- package/dist/validation/goals/index.d.ts.map +1 -0
- package/dist/validation/goals/midpoint.d.cts +4 -0
- package/dist/validation/goals/midpoint.d.ts +5 -0
- package/dist/validation/goals/midpoint.d.ts.map +1 -0
- package/dist/validation/goals/parallel.d.cts +3 -0
- package/dist/validation/goals/parallel.d.ts +4 -0
- package/dist/validation/goals/parallel.d.ts.map +1 -0
- package/dist/validation/goals/perpendicular.d.cts +3 -0
- package/dist/validation/goals/perpendicular.d.ts +4 -0
- package/dist/validation/goals/perpendicular.d.ts.map +1 -0
- package/dist/validation/goals/previewGeometry.d.cts +9 -0
- package/dist/validation/goals/previewGeometry.d.ts +10 -0
- package/dist/validation/goals/previewGeometry.d.ts.map +1 -0
- package/dist/validation/goals/segmentLength.d.cts +3 -0
- package/dist/validation/goals/segmentLength.d.ts +4 -0
- package/dist/validation/goals/segmentLength.d.ts.map +1 -0
- package/dist/validation/goals/throughPoints.d.cts +5 -0
- package/dist/validation/goals/throughPoints.d.ts +6 -0
- package/dist/validation/goals/throughPoints.d.ts.map +1 -0
- package/dist/validation/gradingFingerprints.d.cts +4 -0
- package/dist/validation/gradingFingerprints.d.ts +5 -0
- package/dist/validation/gradingFingerprints.d.ts.map +1 -0
- package/dist/validation/revealGeometryAnswers.d.cts +3 -0
- package/dist/validation/revealGeometryAnswers.d.ts +4 -0
- package/dist/validation/revealGeometryAnswers.d.ts.map +1 -0
- package/dist/validation/revealGeometryAttempt.d.cts +36 -0
- package/dist/validation/revealGeometryAttempt.d.ts +37 -0
- package/dist/validation/revealGeometryAttempt.d.ts.map +1 -0
- package/dist/validation/types.d.cts +58 -0
- package/dist/validation/types.d.ts +59 -0
- package/dist/validation/types.d.ts.map +1 -0
- package/dist/validation/validateGeometryExercise.d.cts +30 -0
- package/dist/validation/validateGeometryExercise.d.ts +31 -0
- package/dist/validation/validateGeometryExercise.d.ts.map +1 -0
- package/dist/validation/validateGeometryState.d.cts +16 -0
- package/dist/validation/validateGeometryState.d.ts +17 -0
- package/dist/validation/validateGeometryState.d.ts.map +1 -0
- package/dist/validation/validateGeometryStateInput.d.cts +22 -0
- package/dist/validation/validateGeometryStateInput.d.ts +23 -0
- package/dist/validation/validateGeometryStateInput.d.ts.map +1 -0
- package/dist/validation.cjs +2 -0
- package/dist/validation.cjs.map +1 -0
- package/dist/validation.mjs +269 -0
- package/dist/validation.mjs.map +1 -0
- package/package.json +150 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const v3ExerciseSchemaVersion = 3;
|
|
3
|
+
/**
|
|
4
|
+
* The exercise document ADR 0013 froze at version 3, so the v3 → v4 step can
|
|
5
|
+
* check what it was handed before promoting it (ADR 0015) — and so the v2 → v3
|
|
6
|
+
* step still has a version 3 to ask once the current schema has moved past it.
|
|
7
|
+
*
|
|
8
|
+
* Version 3 is version 2 plus `grading` and nothing else, so it is built on the
|
|
9
|
+
* frozen v2 transcription rather than transcribed a second time. `grading` is
|
|
10
|
+
* written out here with nothing imported from the current vocabulary, for the
|
|
11
|
+
* reason `exerciseV2.schema.ts` gives: a shared schema admits every later
|
|
12
|
+
* addition to it. Like that schema this one carries no cross-reference
|
|
13
|
+
* refinements and no issue messages; it only answers "could version 3 have
|
|
14
|
+
* said this?".
|
|
15
|
+
*/
|
|
16
|
+
export declare const geometryExerciseV3Schema: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
viewport: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
19
|
+
showGrid: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
entities: z.ZodType<Record<string, {
|
|
21
|
+
kind: "point";
|
|
22
|
+
at: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
};
|
|
26
|
+
} | {
|
|
27
|
+
kind: "point";
|
|
28
|
+
on: string;
|
|
29
|
+
t: number;
|
|
30
|
+
} | {
|
|
31
|
+
kind: "point";
|
|
32
|
+
intersectionOf: readonly [string, string];
|
|
33
|
+
which?: 0 | 1 | undefined;
|
|
34
|
+
} | {
|
|
35
|
+
kind: "segment";
|
|
36
|
+
parents: readonly [string, string];
|
|
37
|
+
} | {
|
|
38
|
+
kind: "line";
|
|
39
|
+
parents: readonly [string, string];
|
|
40
|
+
} | {
|
|
41
|
+
kind: "circle";
|
|
42
|
+
parents: readonly [string, string];
|
|
43
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
44
|
+
kind: "point";
|
|
45
|
+
at: {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
};
|
|
49
|
+
} | {
|
|
50
|
+
kind: "point";
|
|
51
|
+
on: string;
|
|
52
|
+
t: number;
|
|
53
|
+
} | {
|
|
54
|
+
kind: "point";
|
|
55
|
+
intersectionOf: readonly [string, string];
|
|
56
|
+
which?: 0 | 1 | undefined;
|
|
57
|
+
} | {
|
|
58
|
+
kind: "segment";
|
|
59
|
+
parents: readonly [string, string];
|
|
60
|
+
} | {
|
|
61
|
+
kind: "line";
|
|
62
|
+
parents: readonly [string, string];
|
|
63
|
+
} | {
|
|
64
|
+
kind: "circle";
|
|
65
|
+
parents: readonly [string, string];
|
|
66
|
+
}>, unknown>>;
|
|
67
|
+
presentation: z.ZodType<Record<string, {
|
|
68
|
+
role: "implicit" | "explicit";
|
|
69
|
+
label?: string | undefined;
|
|
70
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
71
|
+
role: "implicit" | "explicit";
|
|
72
|
+
label?: string | undefined;
|
|
73
|
+
}>, unknown>>;
|
|
74
|
+
draggableEntityIds: z.ZodArray<z.ZodString>;
|
|
75
|
+
allowedObjects: z.ZodArray<z.ZodEnum<{
|
|
76
|
+
point: "point";
|
|
77
|
+
segment: "segment";
|
|
78
|
+
line: "line";
|
|
79
|
+
circle: "circle";
|
|
80
|
+
}>>;
|
|
81
|
+
tools: z.ZodArray<z.ZodEnum<{
|
|
82
|
+
ruler: "ruler";
|
|
83
|
+
setSquare: "setSquare";
|
|
84
|
+
protractor: "protractor";
|
|
85
|
+
}>>;
|
|
86
|
+
goals: z.ZodArray<z.ZodUnion<z.ZodObject<{
|
|
87
|
+
objectType: z.ZodEnum<{
|
|
88
|
+
point: "point";
|
|
89
|
+
segment: "segment";
|
|
90
|
+
line: "line";
|
|
91
|
+
circle: "circle";
|
|
92
|
+
}>;
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
95
|
+
} | {
|
|
96
|
+
objectType: z.ZodEnum<{
|
|
97
|
+
point: "point";
|
|
98
|
+
segment: "segment";
|
|
99
|
+
line: "line";
|
|
100
|
+
circle: "circle";
|
|
101
|
+
}>;
|
|
102
|
+
pointIds: z.ZodArray<z.ZodString>;
|
|
103
|
+
id: z.ZodString;
|
|
104
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
105
|
+
} | {
|
|
106
|
+
objectType: z.ZodEnum<{
|
|
107
|
+
point: "point";
|
|
108
|
+
segment: "segment";
|
|
109
|
+
line: "line";
|
|
110
|
+
circle: "circle";
|
|
111
|
+
}>;
|
|
112
|
+
referenceObjectId: z.ZodString;
|
|
113
|
+
throughPointId: z.ZodString;
|
|
114
|
+
toleranceDegrees: z.ZodNumber;
|
|
115
|
+
id: z.ZodString;
|
|
116
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
117
|
+
} | {
|
|
118
|
+
objectType: z.ZodEnum<{
|
|
119
|
+
point: "point";
|
|
120
|
+
segment: "segment";
|
|
121
|
+
line: "line";
|
|
122
|
+
circle: "circle";
|
|
123
|
+
}>;
|
|
124
|
+
referenceObjectId: z.ZodString;
|
|
125
|
+
throughPointId: z.ZodString;
|
|
126
|
+
toleranceDegrees: z.ZodNumber;
|
|
127
|
+
id: z.ZodString;
|
|
128
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
129
|
+
} | {
|
|
130
|
+
objectType: z.ZodLiteral<"segment">;
|
|
131
|
+
targetLength: z.ZodNumber;
|
|
132
|
+
toleranceUnits: z.ZodNumber;
|
|
133
|
+
id: z.ZodString;
|
|
134
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
135
|
+
} | {
|
|
136
|
+
objectType: z.ZodLiteral<"point">;
|
|
137
|
+
referenceObjectId: z.ZodString;
|
|
138
|
+
toleranceUnits: z.ZodNumber;
|
|
139
|
+
id: z.ZodString;
|
|
140
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
141
|
+
}, z.core.$strict>[]>>;
|
|
142
|
+
schemaVersion: z.ZodLiteral<3>;
|
|
143
|
+
grading: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
extraObjects: z.ZodEnum<{
|
|
145
|
+
allow: "allow";
|
|
146
|
+
reject: "reject";
|
|
147
|
+
}>;
|
|
148
|
+
}, z.core.$strict>>;
|
|
149
|
+
}, z.core.$strict>;
|
|
150
|
+
//# sourceMappingURL=exerciseV3.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exerciseV3.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/exerciseV3.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,uBAAuB,IAAI,CAAA;AAExC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMnC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const geometryObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"segment">;
|
|
5
|
+
from: z.ZodString;
|
|
6
|
+
to: z.ZodString;
|
|
7
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
type: z.ZodLiteral<"line">;
|
|
10
|
+
through: z.ZodTuple<[z.ZodString, z.ZodString], null>;
|
|
11
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
type: z.ZodLiteral<"circle">;
|
|
14
|
+
center: z.ZodString;
|
|
15
|
+
through: z.ZodString;
|
|
16
|
+
}, z.core.$strict>], "type">;
|
|
17
|
+
export type GeometryObject = z.infer<typeof geometryObjectSchema>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const geometryObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"segment">;
|
|
5
|
+
from: z.ZodString;
|
|
6
|
+
to: z.ZodString;
|
|
7
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
type: z.ZodLiteral<"line">;
|
|
10
|
+
through: z.ZodTuple<[z.ZodString, z.ZodString], null>;
|
|
11
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
type: z.ZodLiteral<"circle">;
|
|
14
|
+
center: z.ZodString;
|
|
15
|
+
through: z.ZodString;
|
|
16
|
+
}, z.core.$strict>], "type">;
|
|
17
|
+
export type GeometryObject = z.infer<typeof geometryObjectSchema>;
|
|
18
|
+
//# sourceMappingURL=geometryObject.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometryObject.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/geometryObject.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;4BAI/B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MigrationOutcome, MigrationStep } from './migrate.cjs';
|
|
3
|
+
export declare const latestGeometryStateVersion = 2;
|
|
4
|
+
export declare const geometryStateMigrations: readonly MigrationStep[];
|
|
5
|
+
export declare const geometryStateSchema: z.ZodObject<{
|
|
6
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
7
|
+
entities: z.ZodType<Record<string, {
|
|
8
|
+
kind: "point";
|
|
9
|
+
at: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
} | {
|
|
14
|
+
kind: "point";
|
|
15
|
+
on: string;
|
|
16
|
+
t: number;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "point";
|
|
19
|
+
intersectionOf: readonly [string, string];
|
|
20
|
+
which?: 0 | 1 | undefined;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "segment";
|
|
23
|
+
parents: readonly [string, string];
|
|
24
|
+
} | {
|
|
25
|
+
kind: "line";
|
|
26
|
+
parents: readonly [string, string];
|
|
27
|
+
} | {
|
|
28
|
+
kind: "circle";
|
|
29
|
+
parents: readonly [string, string];
|
|
30
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
31
|
+
kind: "point";
|
|
32
|
+
at: {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
};
|
|
36
|
+
} | {
|
|
37
|
+
kind: "point";
|
|
38
|
+
on: string;
|
|
39
|
+
t: number;
|
|
40
|
+
} | {
|
|
41
|
+
kind: "point";
|
|
42
|
+
intersectionOf: readonly [string, string];
|
|
43
|
+
which?: 0 | 1 | undefined;
|
|
44
|
+
} | {
|
|
45
|
+
kind: "segment";
|
|
46
|
+
parents: readonly [string, string];
|
|
47
|
+
} | {
|
|
48
|
+
kind: "line";
|
|
49
|
+
parents: readonly [string, string];
|
|
50
|
+
} | {
|
|
51
|
+
kind: "circle";
|
|
52
|
+
parents: readonly [string, string];
|
|
53
|
+
}>, unknown>>;
|
|
54
|
+
presentation: z.ZodType<Record<string, {
|
|
55
|
+
role: "implicit" | "explicit";
|
|
56
|
+
label?: string | undefined;
|
|
57
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
58
|
+
role: "implicit" | "explicit";
|
|
59
|
+
label?: string | undefined;
|
|
60
|
+
}>, unknown>>;
|
|
61
|
+
answerEntityIds: z.ZodArray<z.ZodString>;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
export type GeometryState = z.infer<typeof geometryStateSchema>;
|
|
64
|
+
export declare function migrateGeometryState(input: unknown): MigrationOutcome;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MigrationOutcome, MigrationStep } from './migrate.js';
|
|
3
|
+
export declare const latestGeometryStateVersion = 2;
|
|
4
|
+
export declare const geometryStateMigrations: readonly MigrationStep[];
|
|
5
|
+
export declare const geometryStateSchema: z.ZodObject<{
|
|
6
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
7
|
+
entities: z.ZodType<Record<string, {
|
|
8
|
+
kind: "point";
|
|
9
|
+
at: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
} | {
|
|
14
|
+
kind: "point";
|
|
15
|
+
on: string;
|
|
16
|
+
t: number;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "point";
|
|
19
|
+
intersectionOf: readonly [string, string];
|
|
20
|
+
which?: 0 | 1 | undefined;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "segment";
|
|
23
|
+
parents: readonly [string, string];
|
|
24
|
+
} | {
|
|
25
|
+
kind: "line";
|
|
26
|
+
parents: readonly [string, string];
|
|
27
|
+
} | {
|
|
28
|
+
kind: "circle";
|
|
29
|
+
parents: readonly [string, string];
|
|
30
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
31
|
+
kind: "point";
|
|
32
|
+
at: {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
};
|
|
36
|
+
} | {
|
|
37
|
+
kind: "point";
|
|
38
|
+
on: string;
|
|
39
|
+
t: number;
|
|
40
|
+
} | {
|
|
41
|
+
kind: "point";
|
|
42
|
+
intersectionOf: readonly [string, string];
|
|
43
|
+
which?: 0 | 1 | undefined;
|
|
44
|
+
} | {
|
|
45
|
+
kind: "segment";
|
|
46
|
+
parents: readonly [string, string];
|
|
47
|
+
} | {
|
|
48
|
+
kind: "line";
|
|
49
|
+
parents: readonly [string, string];
|
|
50
|
+
} | {
|
|
51
|
+
kind: "circle";
|
|
52
|
+
parents: readonly [string, string];
|
|
53
|
+
}>, unknown>>;
|
|
54
|
+
presentation: z.ZodType<Record<string, {
|
|
55
|
+
role: "implicit" | "explicit";
|
|
56
|
+
label?: string | undefined;
|
|
57
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
58
|
+
role: "implicit" | "explicit";
|
|
59
|
+
label?: string | undefined;
|
|
60
|
+
}>, unknown>>;
|
|
61
|
+
answerEntityIds: z.ZodArray<z.ZodString>;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
export type GeometryState = z.infer<typeof geometryStateSchema>;
|
|
64
|
+
export declare function migrateGeometryState(input: unknown): MigrationOutcome;
|
|
65
|
+
//# sourceMappingURL=geometryState.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometryState.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/geometryState.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,EAAmB,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAA;AAatF,eAAO,MAAM,0BAA0B,IAAI,CAAA;AAG3C,eAAO,MAAM,uBAAuB,EAAE,SAAS,aAAa,EAA0B,CAAA;AAUtF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuB5B,CAAA;AAEJ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAK/D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAErE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const givenElementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"point">;
|
|
5
|
+
x: z.ZodNumber;
|
|
6
|
+
y: z.ZodNumber;
|
|
7
|
+
label: z.ZodOptional<z.ZodString>;
|
|
8
|
+
draggable: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
type: z.ZodLiteral<"segment">;
|
|
12
|
+
from: z.ZodString;
|
|
13
|
+
to: z.ZodString;
|
|
14
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
type: z.ZodLiteral<"line">;
|
|
17
|
+
through: z.ZodTuple<[z.ZodString, z.ZodString], null>;
|
|
18
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
type: z.ZodLiteral<"circle">;
|
|
21
|
+
center: z.ZodString;
|
|
22
|
+
through: z.ZodString;
|
|
23
|
+
}, z.core.$strict>], "type">;
|
|
24
|
+
export type GivenElement = z.infer<typeof givenElementSchema>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const givenElementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"point">;
|
|
5
|
+
x: z.ZodNumber;
|
|
6
|
+
y: z.ZodNumber;
|
|
7
|
+
label: z.ZodOptional<z.ZodString>;
|
|
8
|
+
draggable: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
type: z.ZodLiteral<"segment">;
|
|
12
|
+
from: z.ZodString;
|
|
13
|
+
to: z.ZodString;
|
|
14
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
type: z.ZodLiteral<"line">;
|
|
17
|
+
through: z.ZodTuple<[z.ZodString, z.ZodString], null>;
|
|
18
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
type: z.ZodLiteral<"circle">;
|
|
21
|
+
center: z.ZodString;
|
|
22
|
+
through: z.ZodString;
|
|
23
|
+
}, z.core.$strict>], "type">;
|
|
24
|
+
export type GivenElement = z.infer<typeof givenElementSchema>;
|
|
25
|
+
//# sourceMappingURL=givenElement.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"givenElement.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/givenElement.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;4BAK7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createGoalSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"create">;
|
|
5
|
+
objectType: z.ZodEnum<{
|
|
6
|
+
point: "point";
|
|
7
|
+
segment: "segment";
|
|
8
|
+
line: "line";
|
|
9
|
+
circle: "circle";
|
|
10
|
+
}>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export type CreateGoal = z.infer<typeof createGoalSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createGoalSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"create">;
|
|
5
|
+
objectType: z.ZodEnum<{
|
|
6
|
+
point: "point";
|
|
7
|
+
segment: "segment";
|
|
8
|
+
line: "line";
|
|
9
|
+
circle: "circle";
|
|
10
|
+
}>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export type CreateGoal = z.infer<typeof createGoalSchema>;
|
|
13
|
+
//# sourceMappingURL=createGoal.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/createGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,gBAAgB;;;;;;;;;kBAMlB,CAAA;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const geometryGoalSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"create">;
|
|
5
|
+
objectType: z.ZodEnum<{
|
|
6
|
+
point: "point";
|
|
7
|
+
segment: "segment";
|
|
8
|
+
line: "line";
|
|
9
|
+
circle: "circle";
|
|
10
|
+
}>;
|
|
11
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
type: z.ZodLiteral<"throughPoints">;
|
|
14
|
+
objectType: z.ZodEnum<{
|
|
15
|
+
point: "point";
|
|
16
|
+
segment: "segment";
|
|
17
|
+
line: "line";
|
|
18
|
+
circle: "circle";
|
|
19
|
+
}>;
|
|
20
|
+
pointIds: z.ZodArray<z.ZodString>;
|
|
21
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
type: z.ZodLiteral<"perpendicular">;
|
|
24
|
+
objectType: z.ZodEnum<{
|
|
25
|
+
point: "point";
|
|
26
|
+
segment: "segment";
|
|
27
|
+
line: "line";
|
|
28
|
+
circle: "circle";
|
|
29
|
+
}>;
|
|
30
|
+
referenceObjectId: z.ZodString;
|
|
31
|
+
throughPointId: z.ZodString;
|
|
32
|
+
toleranceDegrees: z.ZodNumber;
|
|
33
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
type: z.ZodLiteral<"parallel">;
|
|
36
|
+
objectType: z.ZodEnum<{
|
|
37
|
+
point: "point";
|
|
38
|
+
segment: "segment";
|
|
39
|
+
line: "line";
|
|
40
|
+
circle: "circle";
|
|
41
|
+
}>;
|
|
42
|
+
referenceObjectId: z.ZodString;
|
|
43
|
+
throughPointId: z.ZodString;
|
|
44
|
+
toleranceDegrees: z.ZodNumber;
|
|
45
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
type: z.ZodLiteral<"segmentLength">;
|
|
48
|
+
objectType: z.ZodLiteral<"segment">;
|
|
49
|
+
targetLength: z.ZodNumber;
|
|
50
|
+
toleranceUnits: z.ZodNumber;
|
|
51
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
type: z.ZodLiteral<"midpoint">;
|
|
54
|
+
objectType: z.ZodLiteral<"point">;
|
|
55
|
+
referenceObjectId: z.ZodString;
|
|
56
|
+
toleranceUnits: z.ZodNumber;
|
|
57
|
+
}, z.core.$strict>], "type">;
|
|
58
|
+
export type GeometryGoal = z.infer<typeof geometryGoalSchema>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const geometryGoalSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"create">;
|
|
5
|
+
objectType: z.ZodEnum<{
|
|
6
|
+
point: "point";
|
|
7
|
+
segment: "segment";
|
|
8
|
+
line: "line";
|
|
9
|
+
circle: "circle";
|
|
10
|
+
}>;
|
|
11
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
type: z.ZodLiteral<"throughPoints">;
|
|
14
|
+
objectType: z.ZodEnum<{
|
|
15
|
+
point: "point";
|
|
16
|
+
segment: "segment";
|
|
17
|
+
line: "line";
|
|
18
|
+
circle: "circle";
|
|
19
|
+
}>;
|
|
20
|
+
pointIds: z.ZodArray<z.ZodString>;
|
|
21
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
type: z.ZodLiteral<"perpendicular">;
|
|
24
|
+
objectType: z.ZodEnum<{
|
|
25
|
+
point: "point";
|
|
26
|
+
segment: "segment";
|
|
27
|
+
line: "line";
|
|
28
|
+
circle: "circle";
|
|
29
|
+
}>;
|
|
30
|
+
referenceObjectId: z.ZodString;
|
|
31
|
+
throughPointId: z.ZodString;
|
|
32
|
+
toleranceDegrees: z.ZodNumber;
|
|
33
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
type: z.ZodLiteral<"parallel">;
|
|
36
|
+
objectType: z.ZodEnum<{
|
|
37
|
+
point: "point";
|
|
38
|
+
segment: "segment";
|
|
39
|
+
line: "line";
|
|
40
|
+
circle: "circle";
|
|
41
|
+
}>;
|
|
42
|
+
referenceObjectId: z.ZodString;
|
|
43
|
+
throughPointId: z.ZodString;
|
|
44
|
+
toleranceDegrees: z.ZodNumber;
|
|
45
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
type: z.ZodLiteral<"segmentLength">;
|
|
48
|
+
objectType: z.ZodLiteral<"segment">;
|
|
49
|
+
targetLength: z.ZodNumber;
|
|
50
|
+
toleranceUnits: z.ZodNumber;
|
|
51
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
type: z.ZodLiteral<"midpoint">;
|
|
54
|
+
objectType: z.ZodLiteral<"point">;
|
|
55
|
+
referenceObjectId: z.ZodString;
|
|
56
|
+
toleranceUnits: z.ZodNumber;
|
|
57
|
+
}, z.core.$strict>], "type">;
|
|
58
|
+
export type GeometryGoal = z.infer<typeof geometryGoalSchema>;
|
|
59
|
+
//# sourceMappingURL=geometryGoal.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometryGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/geometryGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAO7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { EntityDefinition } from '../../geometry/entityModel.cjs';
|
|
3
|
+
import { ObjectTypeName } from '../objectTypeName.schema.cjs';
|
|
4
|
+
import { GeometryGoal } from './geometryGoal.schema.cjs';
|
|
5
|
+
/**
|
|
6
|
+
* The kinds a goal means when it says "segment or line": the objects that have
|
|
7
|
+
* a direction.
|
|
8
|
+
*
|
|
9
|
+
* `throughPoints`, `perpendicular` and `parallel` all reduce their subject to
|
|
10
|
+
* an endpoint pair and measure that pair. A circle is an object with two
|
|
11
|
+
* parents too — its centre and its through-point — so without this test it is
|
|
12
|
+
* measured as the segment between them (M2.G.3).
|
|
13
|
+
*/
|
|
14
|
+
export declare function isDirectedObjectType(name: ObjectTypeName): boolean;
|
|
15
|
+
/** An authoring error, at a path relative to the goal that produced it. */
|
|
16
|
+
export interface GoalAuthoringIssue {
|
|
17
|
+
path: Array<string | number>;
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* What a cross-reference rule may ask about the exercise around its goal.
|
|
22
|
+
*
|
|
23
|
+
* One member, in the M2 vocabulary: a rule asking "is this a point?" and a rule
|
|
24
|
+
* asking "is this a segment?" are the same question, and answering both from
|
|
25
|
+
* `kind` is what lets one set of rules serve a v1 exercise (through
|
|
26
|
+
* `definitionOfGiven()`) and a v2 one (whose `entities` record already holds
|
|
27
|
+
* definitions) without a second copy.
|
|
28
|
+
*/
|
|
29
|
+
export interface GoalAuthoringContext {
|
|
30
|
+
definitionOf(id: string): EntityDefinition | undefined;
|
|
31
|
+
}
|
|
32
|
+
export interface GoalKindDeclaration<TGoal extends GeometryGoal = GeometryGoal> {
|
|
33
|
+
kind: TGoal['type'];
|
|
34
|
+
schema: z.ZodType<TGoal>;
|
|
35
|
+
/**
|
|
36
|
+
* Every given the goal names, points and objects alike. Removing any of them
|
|
37
|
+
* orphans the goal, which is the teacher editor's question and not a list of
|
|
38
|
+
* type tests it has to keep in step with the goal union.
|
|
39
|
+
*/
|
|
40
|
+
referencedGivenIds(goal: TGoal): readonly string[];
|
|
41
|
+
/**
|
|
42
|
+
* What this kind requires of the exercise around it. Shape is the schema's
|
|
43
|
+
* job; this is only what needs the other givens to answer.
|
|
44
|
+
*/
|
|
45
|
+
crossReferenceIssues(goal: TGoal, exercise: GoalAuthoringContext): GoalAuthoringIssue[];
|
|
46
|
+
}
|
|
47
|
+
export type GoalKindDeclarationRegistry = {
|
|
48
|
+
[K in GeometryGoal['type']]: GoalKindDeclaration<Extract<GeometryGoal, {
|
|
49
|
+
type: K;
|
|
50
|
+
}>>;
|
|
51
|
+
};
|
|
52
|
+
export declare const goalKindDeclarations: GoalKindDeclarationRegistry;
|
|
53
|
+
export declare function declarationFor(goal: GeometryGoal): GoalKindDeclaration;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { EntityDefinition } from '../../geometry/entityModel.js';
|
|
3
|
+
import { ObjectTypeName } from '../objectTypeName.schema.js';
|
|
4
|
+
import { GeometryGoal } from './geometryGoal.schema.js';
|
|
5
|
+
/**
|
|
6
|
+
* The kinds a goal means when it says "segment or line": the objects that have
|
|
7
|
+
* a direction.
|
|
8
|
+
*
|
|
9
|
+
* `throughPoints`, `perpendicular` and `parallel` all reduce their subject to
|
|
10
|
+
* an endpoint pair and measure that pair. A circle is an object with two
|
|
11
|
+
* parents too — its centre and its through-point — so without this test it is
|
|
12
|
+
* measured as the segment between them (M2.G.3).
|
|
13
|
+
*/
|
|
14
|
+
export declare function isDirectedObjectType(name: ObjectTypeName): boolean;
|
|
15
|
+
/** An authoring error, at a path relative to the goal that produced it. */
|
|
16
|
+
export interface GoalAuthoringIssue {
|
|
17
|
+
path: Array<string | number>;
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* What a cross-reference rule may ask about the exercise around its goal.
|
|
22
|
+
*
|
|
23
|
+
* One member, in the M2 vocabulary: a rule asking "is this a point?" and a rule
|
|
24
|
+
* asking "is this a segment?" are the same question, and answering both from
|
|
25
|
+
* `kind` is what lets one set of rules serve a v1 exercise (through
|
|
26
|
+
* `definitionOfGiven()`) and a v2 one (whose `entities` record already holds
|
|
27
|
+
* definitions) without a second copy.
|
|
28
|
+
*/
|
|
29
|
+
export interface GoalAuthoringContext {
|
|
30
|
+
definitionOf(id: string): EntityDefinition | undefined;
|
|
31
|
+
}
|
|
32
|
+
export interface GoalKindDeclaration<TGoal extends GeometryGoal = GeometryGoal> {
|
|
33
|
+
kind: TGoal['type'];
|
|
34
|
+
schema: z.ZodType<TGoal>;
|
|
35
|
+
/**
|
|
36
|
+
* Every given the goal names, points and objects alike. Removing any of them
|
|
37
|
+
* orphans the goal, which is the teacher editor's question and not a list of
|
|
38
|
+
* type tests it has to keep in step with the goal union.
|
|
39
|
+
*/
|
|
40
|
+
referencedGivenIds(goal: TGoal): readonly string[];
|
|
41
|
+
/**
|
|
42
|
+
* What this kind requires of the exercise around it. Shape is the schema's
|
|
43
|
+
* job; this is only what needs the other givens to answer.
|
|
44
|
+
*/
|
|
45
|
+
crossReferenceIssues(goal: TGoal, exercise: GoalAuthoringContext): GoalAuthoringIssue[];
|
|
46
|
+
}
|
|
47
|
+
export type GoalKindDeclarationRegistry = {
|
|
48
|
+
[K in GeometryGoal['type']]: GoalKindDeclaration<Extract<GeometryGoal, {
|
|
49
|
+
type: K;
|
|
50
|
+
}>>;
|
|
51
|
+
};
|
|
52
|
+
export declare const goalKindDeclarations: GoalKindDeclarationRegistry;
|
|
53
|
+
export declare function declarationFor(goal: GeometryGoal): GoalKindDeclaration;
|
|
54
|
+
//# sourceMappingURL=goalKindDeclaration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goalKindDeclaration.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/goalKindDeclaration.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAO9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAElE;AAED,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAAA;CACvD;AAED,MAAM,WAAW,mBAAmB,CAAC,KAAK,SAAS,YAAY,GAAG,YAAY;IAC5E,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACnB,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACxB;;;;OAIG;IACH,kBAAkB,CAAC,IAAI,EAAE,KAAK,GAAG,SAAS,MAAM,EAAE,CAAA;IAClD;;;OAGG;IACH,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,oBAAoB,GAAG,kBAAkB,EAAE,CAAA;CACxF;AAED,MAAM,MAAM,2BAA2B,GAAG;KACvC,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,GAAG,mBAAmB,CAAC,OAAO,CAAC,YAAY,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACrF,CAAA;AA0CD,eAAO,MAAM,oBAAoB,EAAE,2BA8EK,CAAA;AAQxC,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,mBAAmB,CAEtE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const midpointGoalSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"midpoint">;
|
|
5
|
+
objectType: z.ZodLiteral<"point">;
|
|
6
|
+
referenceObjectId: z.ZodString;
|
|
7
|
+
toleranceUnits: z.ZodNumber;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export type MidpointGoal = z.infer<typeof midpointGoalSchema>;
|