@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,47 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { Stage } from 'konva/lib/Stage';
|
|
3
|
+
import { CanvasSize } from '../coordinates/transform.js';
|
|
4
|
+
import { PointId } from '../geometry/point.js';
|
|
5
|
+
import { ObjectTypeName } from '../schemas/objectTypeName.schema.js';
|
|
6
|
+
import { Store } from '../store/createStore.js';
|
|
7
|
+
import { ScreenPoint } from './gesturePolicy.js';
|
|
8
|
+
import { ConnectionPreview } from './useConnectionPreview.js';
|
|
9
|
+
type EpochStore = Pick<Store<{
|
|
10
|
+
interactionEpoch?: number;
|
|
11
|
+
}>, 'getState' | 'subscribe'>;
|
|
12
|
+
export interface PointerGestureHandlers {
|
|
13
|
+
tool: ObjectTypeName | null;
|
|
14
|
+
connection: ConnectionPreview;
|
|
15
|
+
placement: {
|
|
16
|
+
trackAt(pointer: ScreenPoint): void;
|
|
17
|
+
clearPointer(): void;
|
|
18
|
+
};
|
|
19
|
+
pointOnScreen(id: PointId): ScreenPoint | null;
|
|
20
|
+
canDragPoint(id: PointId): boolean;
|
|
21
|
+
dragPoint(id: PointId, to: ScreenPoint): void;
|
|
22
|
+
endPointDrag(id: PointId): void;
|
|
23
|
+
tapPoint(id: PointId): void;
|
|
24
|
+
tapObject(id: string): void;
|
|
25
|
+
tapStage(pointer: ScreenPoint): void;
|
|
26
|
+
abandonConstruction(): void;
|
|
27
|
+
disarmTool(): void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The one pointer lifecycle behind both canvases (RFC 0004 § Decision 4,
|
|
31
|
+
* ADR 0011).
|
|
32
|
+
*
|
|
33
|
+
* Native Pointer Events on the stage's container, one contact at a time,
|
|
34
|
+
* identified by `pointerId` and captured while it is down. A contact is a tap
|
|
35
|
+
* until it moves its pointer type's threshold and a drag from then on, and it
|
|
36
|
+
* becomes geometry only through a normal release on the canvas — no Konva
|
|
37
|
+
* click, tap or drag handler, and no compatibility mouse event, can build or
|
|
38
|
+
* select anything on its own, so one contact is at most one creation.
|
|
39
|
+
*
|
|
40
|
+
* Every other ending is a cancellation, and every cancellation clears the
|
|
41
|
+
* preview, the snap marker, the pending endpoint and the contact, and closes a
|
|
42
|
+
* point drag's undo step where it stands: a dragged point keeps the last
|
|
43
|
+
* position it was moved to, and one Undo takes it back.
|
|
44
|
+
*/
|
|
45
|
+
export declare function usePointerGestures(stageRef: RefObject<Stage | null>, canvas: CanvasSize, store: EpochStore, handlers: PointerGestureHandlers): void;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=usePointerGestures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePointerGestures.d.ts","sourceRoot":"","sources":["../../src/renderer/usePointerGestures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,KAAK,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;IAAE,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,CAAA;AA+BtF,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;IAC3B,UAAU,EAAE,iBAAiB,CAAA;IAC7B,SAAS,EAAE;QAAE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;QAAC,YAAY,IAAI,IAAI,CAAA;KAAE,CAAA;IAGxE,aAAa,CAAC,EAAE,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,CAAA;IAC9C,YAAY,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAA;IAGlC,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,GAAG,IAAI,CAAA;IAC7C,YAAY,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAAA;IAC/B,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAAA;IAC3B,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAEpC,mBAAmB,IAAI,IAAI,CAAA;IAE3B,UAAU,IAAI,IAAI,CAAA;CACnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,EACjC,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,sBAAsB,GAC/B,IAAI,CA8VN"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const circleSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"circle">;
|
|
5
|
+
center: z.ZodString;
|
|
6
|
+
through: z.ZodString;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export type Circle = z.infer<typeof circleSchema>;
|
|
9
|
+
//# sourceMappingURL=circle.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circle.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/circle.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAYvB,eAAO,MAAM,YAAY;;;;;kBAOd,CAAA;AAEX,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const freePointDefinitionSchema: z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"point">;
|
|
4
|
+
at: z.ZodObject<{
|
|
5
|
+
x: z.ZodNumber;
|
|
6
|
+
y: z.ZodNumber;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export declare const onEntityPointDefinitionSchema: z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"point">;
|
|
11
|
+
on: z.ZodString;
|
|
12
|
+
t: z.ZodNumber;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export declare const intersectionPointDefinitionSchema: z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<"point">;
|
|
16
|
+
intersectionOf: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
17
|
+
which: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export declare const pointDefinitionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"point">;
|
|
21
|
+
at: z.ZodObject<{
|
|
22
|
+
x: z.ZodNumber;
|
|
23
|
+
y: z.ZodNumber;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"point">;
|
|
27
|
+
on: z.ZodString;
|
|
28
|
+
t: z.ZodNumber;
|
|
29
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
30
|
+
kind: z.ZodLiteral<"point">;
|
|
31
|
+
intersectionOf: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
32
|
+
which: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
33
|
+
}, z.core.$strict>]>;
|
|
34
|
+
export declare const segmentDefinitionSchema: z.ZodObject<{
|
|
35
|
+
kind: z.ZodLiteral<"segment">;
|
|
36
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export declare const lineDefinitionSchema: z.ZodObject<{
|
|
39
|
+
kind: z.ZodLiteral<"line">;
|
|
40
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export declare const circleDefinitionSchema: z.ZodObject<{
|
|
43
|
+
kind: z.ZodLiteral<"circle">;
|
|
44
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
export declare const entityDefinitionSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
47
|
+
kind: z.ZodLiteral<"point">;
|
|
48
|
+
at: z.ZodObject<{
|
|
49
|
+
x: z.ZodNumber;
|
|
50
|
+
y: z.ZodNumber;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
kind: z.ZodLiteral<"point">;
|
|
54
|
+
on: z.ZodString;
|
|
55
|
+
t: z.ZodNumber;
|
|
56
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"point">;
|
|
58
|
+
intersectionOf: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
59
|
+
which: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
60
|
+
}, z.core.$strict>]>, z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"segment">;
|
|
62
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"line">;
|
|
65
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
66
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
67
|
+
kind: z.ZodLiteral<"circle">;
|
|
68
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
69
|
+
}, z.core.$strict>]>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const freePointDefinitionSchema: z.ZodObject<{
|
|
3
|
+
kind: z.ZodLiteral<"point">;
|
|
4
|
+
at: z.ZodObject<{
|
|
5
|
+
x: z.ZodNumber;
|
|
6
|
+
y: z.ZodNumber;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export declare const onEntityPointDefinitionSchema: z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"point">;
|
|
11
|
+
on: z.ZodString;
|
|
12
|
+
t: z.ZodNumber;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export declare const intersectionPointDefinitionSchema: z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<"point">;
|
|
16
|
+
intersectionOf: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
17
|
+
which: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export declare const pointDefinitionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"point">;
|
|
21
|
+
at: z.ZodObject<{
|
|
22
|
+
x: z.ZodNumber;
|
|
23
|
+
y: z.ZodNumber;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"point">;
|
|
27
|
+
on: z.ZodString;
|
|
28
|
+
t: z.ZodNumber;
|
|
29
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
30
|
+
kind: z.ZodLiteral<"point">;
|
|
31
|
+
intersectionOf: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
32
|
+
which: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
33
|
+
}, z.core.$strict>]>;
|
|
34
|
+
export declare const segmentDefinitionSchema: z.ZodObject<{
|
|
35
|
+
kind: z.ZodLiteral<"segment">;
|
|
36
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export declare const lineDefinitionSchema: z.ZodObject<{
|
|
39
|
+
kind: z.ZodLiteral<"line">;
|
|
40
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export declare const circleDefinitionSchema: z.ZodObject<{
|
|
43
|
+
kind: z.ZodLiteral<"circle">;
|
|
44
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
export declare const entityDefinitionSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
47
|
+
kind: z.ZodLiteral<"point">;
|
|
48
|
+
at: z.ZodObject<{
|
|
49
|
+
x: z.ZodNumber;
|
|
50
|
+
y: z.ZodNumber;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
kind: z.ZodLiteral<"point">;
|
|
54
|
+
on: z.ZodString;
|
|
55
|
+
t: z.ZodNumber;
|
|
56
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"point">;
|
|
58
|
+
intersectionOf: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
59
|
+
which: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
60
|
+
}, z.core.$strict>]>, z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"segment">;
|
|
62
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"line">;
|
|
65
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
66
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
67
|
+
kind: z.ZodLiteral<"circle">;
|
|
68
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
69
|
+
}, z.core.$strict>]>;
|
|
70
|
+
//# sourceMappingURL=entityDefinition.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityDefinition.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/entityDefinition.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAqBvB,eAAO,MAAM,yBAAyB;;;;;;kBAK3B,CAAA;AAMX,eAAO,MAAM,6BAA6B;;;;kBAM/B,CAAA;AAKX,eAAO,MAAM,iCAAiC;;;;kBAMnC,CAAA;AAMX,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;oBAIhC,CAAA;AAQF,eAAO,MAAM,uBAAuB;;;kBAEzB,CAAA;AAEX,eAAO,MAAM,oBAAoB;;;kBAEtB,CAAA;AAIX,eAAO,MAAM,sBAAsB;;;kBAExB,CAAA;AAEX,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;oBAKuB,CAAA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { EntityDefinition, EntityId, EntityPresentation } from '../geometry/entityModel.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* The `entities` / `presentation` record shape, guarded before `z.record()`
|
|
5
|
+
* sees it.
|
|
6
|
+
*
|
|
7
|
+
* `z.record()` reports success and drops a `__proto__` entry, so a v2 document
|
|
8
|
+
* this engine wrote and read back loses that entity at load with no error at
|
|
9
|
+
* all. Two tidier places to catch it do not work, and were measured rather than
|
|
10
|
+
* argued (M2.G.1): a key schema is never asked, because zod skips a `__proto__`
|
|
11
|
+
* key *before* validating it, and a `superRefine` on the record runs after the
|
|
12
|
+
* entry is already gone. `z.preprocess` is the one hook that still sees the own
|
|
13
|
+
* property.
|
|
14
|
+
*
|
|
15
|
+
* One helper for all four records — both records of both documents — because a
|
|
16
|
+
* guard copied four times is a guard three of them will eventually not have.
|
|
17
|
+
*/
|
|
18
|
+
export declare function entityRecordSchema<Value extends z.ZodType>(value: Value): z.ZodType<Record<EntityId, z.output<Value>>, unknown>;
|
|
19
|
+
/** A structural fault, at a path relative to the document that produced it. */
|
|
20
|
+
export interface EntityDocumentIssue {
|
|
21
|
+
path: Array<string | number>;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
/** The half of either v2 document these rules read. */
|
|
25
|
+
export interface EntityDocumentShape {
|
|
26
|
+
entities: Record<EntityId, EntityDefinition>;
|
|
27
|
+
presentation: Record<EntityId, EntityPresentation>;
|
|
28
|
+
}
|
|
29
|
+
export interface EntityDocumentRules {
|
|
30
|
+
/**
|
|
31
|
+
* Whether a parent this document does not declare is an error.
|
|
32
|
+
*
|
|
33
|
+
* True for an exercise, which is self-contained. **False for an attempt**: a
|
|
34
|
+
* student's point sits on a given segment, and since ADR 0008's amendment a
|
|
35
|
+
* v2 attempt no longer copies the givens, so most of its parents live in the
|
|
36
|
+
* other document. `validateGeometryStateInput()` completes the check once it
|
|
37
|
+
* has the exercise — the same staging v1 used for point origins.
|
|
38
|
+
*/
|
|
39
|
+
parentsMustBeDeclared: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Every structural fault a single v2 document can see in itself.
|
|
43
|
+
*
|
|
44
|
+
* Returned rather than reported, so both `superRefine` blocks map them onto
|
|
45
|
+
* their own issue paths and neither owns the rules.
|
|
46
|
+
*/
|
|
47
|
+
export declare function entityDocumentIssues(document: EntityDocumentShape, rules: EntityDocumentRules): EntityDocumentIssue[];
|
|
48
|
+
/**
|
|
49
|
+
* The parent rules a v2 attempt cannot check alone, completed against the
|
|
50
|
+
* exercise it is an attempt at.
|
|
51
|
+
*
|
|
52
|
+
* `entityDocumentIssues()` skips a parent an attempt does not declare, because
|
|
53
|
+
* since ADR 0008 § Amendment most of them are given entities living in the
|
|
54
|
+
* other document. This is the other half, and the reason it is here rather than
|
|
55
|
+
* in `validateGeometryStateInput()`: a parent that turns out to be a given is
|
|
56
|
+
* judged by exactly the rules a declared one is, in exactly the same words.
|
|
57
|
+
*
|
|
58
|
+
* The *kind* rules are asked only of the parents the attempt does not declare —
|
|
59
|
+
* the rest have already been reported by the schema, and reporting them twice
|
|
60
|
+
* would make one fault look like two. One rule reaches the declared ones as
|
|
61
|
+
* well, because the schema cannot ask it: an entity **the exercise declares**
|
|
62
|
+
* may not be defined on an entity it does not (M2.G.5), and a parent the
|
|
63
|
+
* attempt declares is exactly the case that violates it.
|
|
64
|
+
*/
|
|
65
|
+
export declare function crossDocumentParentIssues(attempt: EntityDocumentShape, given: Record<EntityId, EntityDefinition>): EntityDocumentIssue[];
|
|
66
|
+
/**
|
|
67
|
+
* Whether the two documents declaring the same id is a *collision* rather than
|
|
68
|
+
* a re-declaration.
|
|
69
|
+
*
|
|
70
|
+
* One rule, read by both callers, because they answer for the same document
|
|
71
|
+
* pair and had no reason to say it twice: `buildGeometryContext()` asks it to
|
|
72
|
+
* decide whether to drop the attempt's entity and report `duplicate-id`, and
|
|
73
|
+
* `validateGeometryStateInput()` asks it to refuse the document outright.
|
|
74
|
+
*
|
|
75
|
+
* A given **point** re-declared as a **point** is the one shared id that is
|
|
76
|
+
* not a collision — it is how the student moves a draggable given, and how
|
|
77
|
+
* every migrated v1 attempt arrives (ADR 0008 § Amendment). Every other pair
|
|
78
|
+
* is one document claiming an id the other already gave a different meaning.
|
|
79
|
+
*/
|
|
80
|
+
export declare function isCrossDocumentIdCollision(given: EntityDefinition, declared: EntityDefinition): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The collisions of `isCrossDocumentIdCollision()`, as load errors.
|
|
83
|
+
*
|
|
84
|
+
* The context reports these as `duplicate-id` issues and then resolves the id
|
|
85
|
+
* to the *exercise's* declaration, so an attempt declaring segment `A` over
|
|
86
|
+
* given point `A` used to load clean and then have the given graded as the
|
|
87
|
+
* student's construction (M2.G.2). Refusing the document is the fix: nothing
|
|
88
|
+
* downstream has to decide what a contested id means, because it never gets
|
|
89
|
+
* one.
|
|
90
|
+
*/
|
|
91
|
+
export declare function crossDocumentIdCollisionIssues(attempt: EntityDocumentShape, given: Record<EntityId, EntityDefinition>): EntityDocumentIssue[];
|
|
92
|
+
/** `answerEntityIds` and `draggableEntityIds` are the same list rule twice. */
|
|
93
|
+
export declare function entityIdListIssues(ids: readonly EntityId[], field: string, document: EntityDocumentShape, options?: {
|
|
94
|
+
pointsOnly?: boolean;
|
|
95
|
+
}): EntityDocumentIssue[];
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { EntityDefinition, EntityId, EntityPresentation } from '../geometry/entityModel.js';
|
|
3
|
+
/**
|
|
4
|
+
* The `entities` / `presentation` record shape, guarded before `z.record()`
|
|
5
|
+
* sees it.
|
|
6
|
+
*
|
|
7
|
+
* `z.record()` reports success and drops a `__proto__` entry, so a v2 document
|
|
8
|
+
* this engine wrote and read back loses that entity at load with no error at
|
|
9
|
+
* all. Two tidier places to catch it do not work, and were measured rather than
|
|
10
|
+
* argued (M2.G.1): a key schema is never asked, because zod skips a `__proto__`
|
|
11
|
+
* key *before* validating it, and a `superRefine` on the record runs after the
|
|
12
|
+
* entry is already gone. `z.preprocess` is the one hook that still sees the own
|
|
13
|
+
* property.
|
|
14
|
+
*
|
|
15
|
+
* One helper for all four records — both records of both documents — because a
|
|
16
|
+
* guard copied four times is a guard three of them will eventually not have.
|
|
17
|
+
*/
|
|
18
|
+
export declare function entityRecordSchema<Value extends z.ZodType>(value: Value): z.ZodType<Record<EntityId, z.output<Value>>, unknown>;
|
|
19
|
+
/** A structural fault, at a path relative to the document that produced it. */
|
|
20
|
+
export interface EntityDocumentIssue {
|
|
21
|
+
path: Array<string | number>;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
/** The half of either v2 document these rules read. */
|
|
25
|
+
export interface EntityDocumentShape {
|
|
26
|
+
entities: Record<EntityId, EntityDefinition>;
|
|
27
|
+
presentation: Record<EntityId, EntityPresentation>;
|
|
28
|
+
}
|
|
29
|
+
export interface EntityDocumentRules {
|
|
30
|
+
/**
|
|
31
|
+
* Whether a parent this document does not declare is an error.
|
|
32
|
+
*
|
|
33
|
+
* True for an exercise, which is self-contained. **False for an attempt**: a
|
|
34
|
+
* student's point sits on a given segment, and since ADR 0008's amendment a
|
|
35
|
+
* v2 attempt no longer copies the givens, so most of its parents live in the
|
|
36
|
+
* other document. `validateGeometryStateInput()` completes the check once it
|
|
37
|
+
* has the exercise — the same staging v1 used for point origins.
|
|
38
|
+
*/
|
|
39
|
+
parentsMustBeDeclared: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Every structural fault a single v2 document can see in itself.
|
|
43
|
+
*
|
|
44
|
+
* Returned rather than reported, so both `superRefine` blocks map them onto
|
|
45
|
+
* their own issue paths and neither owns the rules.
|
|
46
|
+
*/
|
|
47
|
+
export declare function entityDocumentIssues(document: EntityDocumentShape, rules: EntityDocumentRules): EntityDocumentIssue[];
|
|
48
|
+
/**
|
|
49
|
+
* The parent rules a v2 attempt cannot check alone, completed against the
|
|
50
|
+
* exercise it is an attempt at.
|
|
51
|
+
*
|
|
52
|
+
* `entityDocumentIssues()` skips a parent an attempt does not declare, because
|
|
53
|
+
* since ADR 0008 § Amendment most of them are given entities living in the
|
|
54
|
+
* other document. This is the other half, and the reason it is here rather than
|
|
55
|
+
* in `validateGeometryStateInput()`: a parent that turns out to be a given is
|
|
56
|
+
* judged by exactly the rules a declared one is, in exactly the same words.
|
|
57
|
+
*
|
|
58
|
+
* The *kind* rules are asked only of the parents the attempt does not declare —
|
|
59
|
+
* the rest have already been reported by the schema, and reporting them twice
|
|
60
|
+
* would make one fault look like two. One rule reaches the declared ones as
|
|
61
|
+
* well, because the schema cannot ask it: an entity **the exercise declares**
|
|
62
|
+
* may not be defined on an entity it does not (M2.G.5), and a parent the
|
|
63
|
+
* attempt declares is exactly the case that violates it.
|
|
64
|
+
*/
|
|
65
|
+
export declare function crossDocumentParentIssues(attempt: EntityDocumentShape, given: Record<EntityId, EntityDefinition>): EntityDocumentIssue[];
|
|
66
|
+
/**
|
|
67
|
+
* Whether the two documents declaring the same id is a *collision* rather than
|
|
68
|
+
* a re-declaration.
|
|
69
|
+
*
|
|
70
|
+
* One rule, read by both callers, because they answer for the same document
|
|
71
|
+
* pair and had no reason to say it twice: `buildGeometryContext()` asks it to
|
|
72
|
+
* decide whether to drop the attempt's entity and report `duplicate-id`, and
|
|
73
|
+
* `validateGeometryStateInput()` asks it to refuse the document outright.
|
|
74
|
+
*
|
|
75
|
+
* A given **point** re-declared as a **point** is the one shared id that is
|
|
76
|
+
* not a collision — it is how the student moves a draggable given, and how
|
|
77
|
+
* every migrated v1 attempt arrives (ADR 0008 § Amendment). Every other pair
|
|
78
|
+
* is one document claiming an id the other already gave a different meaning.
|
|
79
|
+
*/
|
|
80
|
+
export declare function isCrossDocumentIdCollision(given: EntityDefinition, declared: EntityDefinition): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The collisions of `isCrossDocumentIdCollision()`, as load errors.
|
|
83
|
+
*
|
|
84
|
+
* The context reports these as `duplicate-id` issues and then resolves the id
|
|
85
|
+
* to the *exercise's* declaration, so an attempt declaring segment `A` over
|
|
86
|
+
* given point `A` used to load clean and then have the given graded as the
|
|
87
|
+
* student's construction (M2.G.2). Refusing the document is the fix: nothing
|
|
88
|
+
* downstream has to decide what a contested id means, because it never gets
|
|
89
|
+
* one.
|
|
90
|
+
*/
|
|
91
|
+
export declare function crossDocumentIdCollisionIssues(attempt: EntityDocumentShape, given: Record<EntityId, EntityDefinition>): EntityDocumentIssue[];
|
|
92
|
+
/** `answerEntityIds` and `draggableEntityIds` are the same list rule twice. */
|
|
93
|
+
export declare function entityIdListIssues(ids: readonly EntityId[], field: string, document: EntityDocumentShape, options?: {
|
|
94
|
+
pointsOnly?: boolean;
|
|
95
|
+
}): EntityDocumentIssue[];
|
|
96
|
+
//# sourceMappingURL=entityDocument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityDocument.d.ts","sourceRoot":"","sources":["../../src/schemas/entityDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAqB7F;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,SAAS,CAAC,CAAC,OAAO,EACxD,KAAK,EAAE,KAAK,GACX,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAmBvD;AAED,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,uDAAuD;AACvD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAA;IAC5C,YAAY,EAAE,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAA;CACnD;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;OAQG;IACH,qBAAqB,EAAE,OAAO,CAAA;CAC/B;AAuBD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,mBAAmB,EAC7B,KAAK,EAAE,mBAAmB,GACzB,mBAAmB,EAAE,CAuEvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC,GACxC,mBAAmB,EAAE,CAwCvB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAET;AAED;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,mBAAmB,EAC5B,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC,GACxC,mBAAmB,EAAE,CAWvB;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,SAAS,QAAQ,EAAE,EACxB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACrC,mBAAmB,EAAE,CAevB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const entityRoleSchema: z.ZodEnum<{
|
|
3
|
+
implicit: "implicit";
|
|
4
|
+
explicit: "explicit";
|
|
5
|
+
}>;
|
|
6
|
+
export declare const entityPresentationSchema: z.ZodObject<{
|
|
7
|
+
role: z.ZodEnum<{
|
|
8
|
+
implicit: "implicit";
|
|
9
|
+
explicit: "explicit";
|
|
10
|
+
}>;
|
|
11
|
+
label: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const entityRoleSchema: z.ZodEnum<{
|
|
3
|
+
implicit: "implicit";
|
|
4
|
+
explicit: "explicit";
|
|
5
|
+
}>;
|
|
6
|
+
export declare const entityPresentationSchema: z.ZodObject<{
|
|
7
|
+
role: z.ZodEnum<{
|
|
8
|
+
implicit: "implicit";
|
|
9
|
+
explicit: "explicit";
|
|
10
|
+
}>;
|
|
11
|
+
label: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
//# sourceMappingURL=entityPresentation.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityPresentation.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/entityPresentation.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,eAAO,MAAM,gBAAgB;;;EAAmC,CAAA;AAMhE,eAAO,MAAM,wBAAwB;;;;;;kBAOkC,CAAA"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MigrationOutcome, MigrationStep } from './migrate.cjs';
|
|
3
|
+
export declare const toolNameSchema: z.ZodEnum<{
|
|
4
|
+
ruler: "ruler";
|
|
5
|
+
setSquare: "setSquare";
|
|
6
|
+
protractor: "protractor";
|
|
7
|
+
}>;
|
|
8
|
+
export type ToolName = z.infer<typeof toolNameSchema>;
|
|
9
|
+
export declare const latestGeometryExerciseVersion = 4;
|
|
10
|
+
export declare const extraObjectPolicySchema: z.ZodEnum<{
|
|
11
|
+
allow: "allow";
|
|
12
|
+
reject: "reject";
|
|
13
|
+
}>;
|
|
14
|
+
export type ExtraObjectPolicy = z.infer<typeof extraObjectPolicySchema>;
|
|
15
|
+
export declare const exerciseGradingSchema: z.ZodObject<{
|
|
16
|
+
extraObjects: z.ZodEnum<{
|
|
17
|
+
allow: "allow";
|
|
18
|
+
reject: "reject";
|
|
19
|
+
}>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export type ExerciseGrading = z.infer<typeof exerciseGradingSchema>;
|
|
22
|
+
export declare const geometryExerciseSchema: z.ZodObject<{
|
|
23
|
+
schemaVersion: z.ZodLiteral<4>;
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
viewport: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
26
|
+
showGrid: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
entities: z.ZodType<Record<string, {
|
|
28
|
+
kind: "point";
|
|
29
|
+
at: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
};
|
|
33
|
+
} | {
|
|
34
|
+
kind: "point";
|
|
35
|
+
on: string;
|
|
36
|
+
t: number;
|
|
37
|
+
} | {
|
|
38
|
+
kind: "point";
|
|
39
|
+
intersectionOf: readonly [string, string];
|
|
40
|
+
which?: 0 | 1 | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
kind: "segment";
|
|
43
|
+
parents: readonly [string, string];
|
|
44
|
+
} | {
|
|
45
|
+
kind: "line";
|
|
46
|
+
parents: readonly [string, string];
|
|
47
|
+
} | {
|
|
48
|
+
kind: "circle";
|
|
49
|
+
parents: readonly [string, string];
|
|
50
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
51
|
+
kind: "point";
|
|
52
|
+
at: {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
};
|
|
56
|
+
} | {
|
|
57
|
+
kind: "point";
|
|
58
|
+
on: string;
|
|
59
|
+
t: number;
|
|
60
|
+
} | {
|
|
61
|
+
kind: "point";
|
|
62
|
+
intersectionOf: readonly [string, string];
|
|
63
|
+
which?: 0 | 1 | undefined;
|
|
64
|
+
} | {
|
|
65
|
+
kind: "segment";
|
|
66
|
+
parents: readonly [string, string];
|
|
67
|
+
} | {
|
|
68
|
+
kind: "line";
|
|
69
|
+
parents: readonly [string, string];
|
|
70
|
+
} | {
|
|
71
|
+
kind: "circle";
|
|
72
|
+
parents: readonly [string, string];
|
|
73
|
+
}>, unknown>>;
|
|
74
|
+
presentation: z.ZodType<Record<string, {
|
|
75
|
+
role: "implicit" | "explicit";
|
|
76
|
+
label?: string | undefined;
|
|
77
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
78
|
+
role: "implicit" | "explicit";
|
|
79
|
+
label?: string | undefined;
|
|
80
|
+
}>, unknown>>;
|
|
81
|
+
draggableEntityIds: z.ZodArray<z.ZodString>;
|
|
82
|
+
allowedObjects: z.ZodArray<z.ZodEnum<{
|
|
83
|
+
point: "point";
|
|
84
|
+
segment: "segment";
|
|
85
|
+
line: "line";
|
|
86
|
+
circle: "circle";
|
|
87
|
+
}>>;
|
|
88
|
+
tools: z.ZodArray<z.ZodEnum<{
|
|
89
|
+
ruler: "ruler";
|
|
90
|
+
setSquare: "setSquare";
|
|
91
|
+
protractor: "protractor";
|
|
92
|
+
}>>;
|
|
93
|
+
goals: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
94
|
+
id: z.ZodString;
|
|
95
|
+
type: z.ZodLiteral<"create">;
|
|
96
|
+
objectType: z.ZodEnum<{
|
|
97
|
+
point: "point";
|
|
98
|
+
segment: "segment";
|
|
99
|
+
line: "line";
|
|
100
|
+
circle: "circle";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
103
|
+
id: z.ZodString;
|
|
104
|
+
type: z.ZodLiteral<"throughPoints">;
|
|
105
|
+
objectType: z.ZodEnum<{
|
|
106
|
+
point: "point";
|
|
107
|
+
segment: "segment";
|
|
108
|
+
line: "line";
|
|
109
|
+
circle: "circle";
|
|
110
|
+
}>;
|
|
111
|
+
pointIds: z.ZodArray<z.ZodString>;
|
|
112
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
type: z.ZodLiteral<"perpendicular">;
|
|
115
|
+
objectType: z.ZodEnum<{
|
|
116
|
+
point: "point";
|
|
117
|
+
segment: "segment";
|
|
118
|
+
line: "line";
|
|
119
|
+
circle: "circle";
|
|
120
|
+
}>;
|
|
121
|
+
referenceObjectId: z.ZodString;
|
|
122
|
+
throughPointId: z.ZodString;
|
|
123
|
+
toleranceDegrees: z.ZodNumber;
|
|
124
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
125
|
+
id: z.ZodString;
|
|
126
|
+
type: z.ZodLiteral<"parallel">;
|
|
127
|
+
objectType: z.ZodEnum<{
|
|
128
|
+
point: "point";
|
|
129
|
+
segment: "segment";
|
|
130
|
+
line: "line";
|
|
131
|
+
circle: "circle";
|
|
132
|
+
}>;
|
|
133
|
+
referenceObjectId: z.ZodString;
|
|
134
|
+
throughPointId: z.ZodString;
|
|
135
|
+
toleranceDegrees: z.ZodNumber;
|
|
136
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
137
|
+
id: z.ZodString;
|
|
138
|
+
type: z.ZodLiteral<"segmentLength">;
|
|
139
|
+
objectType: z.ZodLiteral<"segment">;
|
|
140
|
+
targetLength: z.ZodNumber;
|
|
141
|
+
toleranceUnits: z.ZodNumber;
|
|
142
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
143
|
+
id: z.ZodString;
|
|
144
|
+
type: z.ZodLiteral<"midpoint">;
|
|
145
|
+
objectType: z.ZodLiteral<"point">;
|
|
146
|
+
referenceObjectId: z.ZodString;
|
|
147
|
+
toleranceUnits: z.ZodNumber;
|
|
148
|
+
}, z.core.$strict>], "type">>;
|
|
149
|
+
grading: z.ZodOptional<z.ZodObject<{
|
|
150
|
+
extraObjects: z.ZodEnum<{
|
|
151
|
+
allow: "allow";
|
|
152
|
+
reject: "reject";
|
|
153
|
+
}>;
|
|
154
|
+
}, z.core.$strict>>;
|
|
155
|
+
solution: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
157
|
+
entities: z.ZodType<Record<string, {
|
|
158
|
+
kind: "point";
|
|
159
|
+
at: {
|
|
160
|
+
x: number;
|
|
161
|
+
y: number;
|
|
162
|
+
};
|
|
163
|
+
} | {
|
|
164
|
+
kind: "point";
|
|
165
|
+
on: string;
|
|
166
|
+
t: number;
|
|
167
|
+
} | {
|
|
168
|
+
kind: "point";
|
|
169
|
+
intersectionOf: readonly [string, string];
|
|
170
|
+
which?: 0 | 1 | undefined;
|
|
171
|
+
} | {
|
|
172
|
+
kind: "segment";
|
|
173
|
+
parents: readonly [string, string];
|
|
174
|
+
} | {
|
|
175
|
+
kind: "line";
|
|
176
|
+
parents: readonly [string, string];
|
|
177
|
+
} | {
|
|
178
|
+
kind: "circle";
|
|
179
|
+
parents: readonly [string, string];
|
|
180
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
181
|
+
kind: "point";
|
|
182
|
+
at: {
|
|
183
|
+
x: number;
|
|
184
|
+
y: number;
|
|
185
|
+
};
|
|
186
|
+
} | {
|
|
187
|
+
kind: "point";
|
|
188
|
+
on: string;
|
|
189
|
+
t: number;
|
|
190
|
+
} | {
|
|
191
|
+
kind: "point";
|
|
192
|
+
intersectionOf: readonly [string, string];
|
|
193
|
+
which?: 0 | 1 | undefined;
|
|
194
|
+
} | {
|
|
195
|
+
kind: "segment";
|
|
196
|
+
parents: readonly [string, string];
|
|
197
|
+
} | {
|
|
198
|
+
kind: "line";
|
|
199
|
+
parents: readonly [string, string];
|
|
200
|
+
} | {
|
|
201
|
+
kind: "circle";
|
|
202
|
+
parents: readonly [string, string];
|
|
203
|
+
}>, unknown>>;
|
|
204
|
+
presentation: z.ZodType<Record<string, {
|
|
205
|
+
role: "implicit" | "explicit";
|
|
206
|
+
label?: string | undefined;
|
|
207
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
208
|
+
role: "implicit" | "explicit";
|
|
209
|
+
label?: string | undefined;
|
|
210
|
+
}>, unknown>>;
|
|
211
|
+
answerEntityIds: z.ZodArray<z.ZodString>;
|
|
212
|
+
}, z.core.$strict>>;
|
|
213
|
+
}, z.core.$strict>;
|
|
214
|
+
export type GeometryExercise = z.infer<typeof geometryExerciseSchema>;
|
|
215
|
+
export declare const geometryExerciseMigrations: readonly MigrationStep[];
|
|
216
|
+
export declare function parseGeometryExercise(input: unknown): GeometryExercise;
|
|
217
|
+
export declare function migrateGeometryExercise(input: unknown): MigrationOutcome;
|