@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,9 @@
|
|
|
1
|
+
import { Point } from './point.cjs';
|
|
2
|
+
export declare function projectionParameter(point: Point, a: Point, b: Point): number | null;
|
|
3
|
+
export declare function pointAlong(a: Point, b: Point, t: number): Point;
|
|
4
|
+
export declare function closestPointOnLine(point: Point, a: Point, b: Point): Point;
|
|
5
|
+
export declare function closestPointOnSegment(point: Point, a: Point, b: Point): Point;
|
|
6
|
+
export declare function distancePointToLine(point: Point, a: Point, b: Point): number;
|
|
7
|
+
export declare function distancePointToSegment(point: Point, a: Point, b: Point): number;
|
|
8
|
+
export declare function distancePointToCircle(point: Point, center: Point, radius: number): number;
|
|
9
|
+
export declare function closestPointOnCircle(point: Point, center: Point, radius: number): Point | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Point } from './point.js';
|
|
2
|
+
export declare function projectionParameter(point: Point, a: Point, b: Point): number | null;
|
|
3
|
+
export declare function pointAlong(a: Point, b: Point, t: number): Point;
|
|
4
|
+
export declare function closestPointOnLine(point: Point, a: Point, b: Point): Point;
|
|
5
|
+
export declare function closestPointOnSegment(point: Point, a: Point, b: Point): Point;
|
|
6
|
+
export declare function distancePointToLine(point: Point, a: Point, b: Point): number;
|
|
7
|
+
export declare function distancePointToSegment(point: Point, a: Point, b: Point): number;
|
|
8
|
+
export declare function distancePointToCircle(point: Point, center: Point, radius: number): number;
|
|
9
|
+
export declare function closestPointOnCircle(point: Point, center: Point, radius: number): Point | null;
|
|
10
|
+
//# sourceMappingURL=distance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distance.d.ts","sourceRoot":"","sources":["../../src/geometry/distance.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AAOrD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAmBnF;AAID,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAE/D;AAGD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAI1E;AAID,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAI7E;AAID,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAE5E;AAKD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAE/E;AAMD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEzF;AAOD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAM9F"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CircleDefinition, ResolvedCircle } from '../entityModel.cjs';
|
|
2
|
+
export declare const circleOperations: {
|
|
3
|
+
kind: "circle";
|
|
4
|
+
parents: (definition: CircleDefinition) => readonly [string, string];
|
|
5
|
+
resolve: (_definition: CircleDefinition, [center, through]: readonly import('../entityModel.cjs').ResolvedEntity[]) => {
|
|
6
|
+
kind: "circle";
|
|
7
|
+
center: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
radius: number;
|
|
12
|
+
} | null;
|
|
13
|
+
toShape: (resolved: ResolvedCircle) => {
|
|
14
|
+
shape: "circle";
|
|
15
|
+
center: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
radius: number;
|
|
20
|
+
};
|
|
21
|
+
toMeasured: (resolved: ResolvedCircle) => {
|
|
22
|
+
type: "circle";
|
|
23
|
+
center: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
radius: number;
|
|
28
|
+
};
|
|
29
|
+
distanceTo: (resolved: ResolvedCircle, at: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}) => number;
|
|
33
|
+
describe: (definition: CircleDefinition, nameOf: (id: import('../entityModel.cjs').EntityId) => string) => string;
|
|
34
|
+
hitPriority: number;
|
|
35
|
+
identityKey: (definition: CircleDefinition) => string;
|
|
36
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CircleDefinition, ResolvedCircle } from '../entityModel.js';
|
|
2
|
+
export declare const circleOperations: {
|
|
3
|
+
kind: "circle";
|
|
4
|
+
parents: (definition: CircleDefinition) => readonly [string, string];
|
|
5
|
+
resolve: (_definition: CircleDefinition, [center, through]: readonly import('../entityModel.js').ResolvedEntity[]) => {
|
|
6
|
+
kind: "circle";
|
|
7
|
+
center: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
radius: number;
|
|
12
|
+
} | null;
|
|
13
|
+
toShape: (resolved: ResolvedCircle) => {
|
|
14
|
+
shape: "circle";
|
|
15
|
+
center: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
radius: number;
|
|
20
|
+
};
|
|
21
|
+
toMeasured: (resolved: ResolvedCircle) => {
|
|
22
|
+
type: "circle";
|
|
23
|
+
center: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
radius: number;
|
|
28
|
+
};
|
|
29
|
+
distanceTo: (resolved: ResolvedCircle, at: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}) => number;
|
|
33
|
+
describe: (definition: CircleDefinition, nameOf: (id: import('../entityModel.js').EntityId) => string) => string;
|
|
34
|
+
hitPriority: number;
|
|
35
|
+
identityKey: (definition: CircleDefinition) => string;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=circle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circle.d.ts","sourceRoot":"","sources":["../../../src/geometry/entities/circle.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAGxF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDiC,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EntityDefinition, EntityId, EntityKind, EntityRegistry, ResolvedEntity, ResolvedEntityOf, ShapeDescriptor } from '../entityModel.cjs';
|
|
2
|
+
import { Point } from '../point.cjs';
|
|
3
|
+
import { MeasuredObject } from '../../measure/geometryAdapter.cjs';
|
|
4
|
+
export { intersectEntities, parameterOnEntity, pointOnEntity } from './relations.cjs';
|
|
5
|
+
export declare const entityRegistry: EntityRegistry;
|
|
6
|
+
/**
|
|
7
|
+
* Every kind the registry declares. Read off the registry rather than written
|
|
8
|
+
* out again, so a consumer that has to enumerate kinds — a snap that offers
|
|
9
|
+
* every locus, a toolbar that offers every construction — grows with it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const entityKinds: readonly EntityKind[];
|
|
12
|
+
/**
|
|
13
|
+
* Every kind but the point: the entities a position can lie *on*.
|
|
14
|
+
*
|
|
15
|
+
* A point is a location and the rest are loci, which is the one distinction
|
|
16
|
+
* that survives generalization — it is why `parameterAt` has no meaning for a
|
|
17
|
+
* point and why snapping asks these kinds and not that one.
|
|
18
|
+
*/
|
|
19
|
+
export declare const objectEntityKinds: readonly EntityKind[];
|
|
20
|
+
/** Every entity `definition` is built on, in declaration order. */
|
|
21
|
+
export declare function parentsOfDefinition(definition: EntityDefinition): readonly EntityId[];
|
|
22
|
+
/**
|
|
23
|
+
* Evaluates `definition` against its already-resolved parents, which must be
|
|
24
|
+
* in the order `parentsOfDefinition()` gave. `null` means "not on screen".
|
|
25
|
+
*
|
|
26
|
+
* A caller that could not resolve every parent should not call this at all:
|
|
27
|
+
* passing a short list would silently slide the parents that did resolve into
|
|
28
|
+
* the wrong positions.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveDefinition<D extends EntityDefinition>(definition: D, parents: readonly ResolvedEntity[]): ResolvedEntityOf<D['kind']> | null;
|
|
31
|
+
/**
|
|
32
|
+
* The resolved form of `definition` against points that have already been
|
|
33
|
+
* resolved for the scene it belongs to — `null` when it is not on screen.
|
|
34
|
+
*
|
|
35
|
+
* For the consumers that hold a definition and a point map rather than a
|
|
36
|
+
* context: `hitTest()` and `computeSnap()` are handed a scene assembled by a
|
|
37
|
+
* renderer, and a preview scene has no context to ask. A caller holding an
|
|
38
|
+
* `IndexedGeometryContext` asks that instead, because its answers are cached
|
|
39
|
+
* and these are computed per call.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveAgainstPoints(definition: EntityDefinition, points: ReadonlyMap<EntityId, Point>): ResolvedEntity | null;
|
|
42
|
+
/** What a renderer draws. */
|
|
43
|
+
export declare function shapeOfResolved(resolved: ResolvedEntity): ShapeDescriptor;
|
|
44
|
+
/** The two-point reduction the measurement seam accepts, or null. */
|
|
45
|
+
export declare function measuredOfResolved(resolved: ResolvedEntity): MeasuredObject | null;
|
|
46
|
+
/** Distance to the drawn object, in math space. */
|
|
47
|
+
export declare function distanceToResolved(resolved: ResolvedEntity, at: Point): number;
|
|
48
|
+
/** Rank at equal distance, lower wins. */
|
|
49
|
+
export declare function hitPriorityOf(kind: EntityKind): number;
|
|
50
|
+
/** The key deciding whether two definitions are the same construction. */
|
|
51
|
+
export declare function identityKeyOf(definition: EntityDefinition): string;
|
|
52
|
+
/**
|
|
53
|
+
* One sentence saying what this entity is, for the semantic companion (M1b.3).
|
|
54
|
+
*
|
|
55
|
+
* `nameOf` resolves a parent id to the name that surface calls it — the
|
|
56
|
+
* renderer passes `entityDisplayName()`, so "segment from A to B" names the
|
|
57
|
+
* two points the canvas has labelled `A` and `B`. A caller with no naming of
|
|
58
|
+
* its own may pass the identity function and get ids.
|
|
59
|
+
*/
|
|
60
|
+
export declare function describeDefinition(definition: EntityDefinition, nameOf: (id: EntityId) => string): string;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { EntityDefinition, EntityId, EntityKind, EntityRegistry, ResolvedEntity, ResolvedEntityOf, ShapeDescriptor } from '../entityModel.js';
|
|
2
|
+
import { Point } from '../point.js';
|
|
3
|
+
import { MeasuredObject } from '../../measure/geometryAdapter.js';
|
|
4
|
+
export { intersectEntities, parameterOnEntity, pointOnEntity } from './relations.js';
|
|
5
|
+
export declare const entityRegistry: EntityRegistry;
|
|
6
|
+
/**
|
|
7
|
+
* Every kind the registry declares. Read off the registry rather than written
|
|
8
|
+
* out again, so a consumer that has to enumerate kinds — a snap that offers
|
|
9
|
+
* every locus, a toolbar that offers every construction — grows with it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const entityKinds: readonly EntityKind[];
|
|
12
|
+
/**
|
|
13
|
+
* Every kind but the point: the entities a position can lie *on*.
|
|
14
|
+
*
|
|
15
|
+
* A point is a location and the rest are loci, which is the one distinction
|
|
16
|
+
* that survives generalization — it is why `parameterAt` has no meaning for a
|
|
17
|
+
* point and why snapping asks these kinds and not that one.
|
|
18
|
+
*/
|
|
19
|
+
export declare const objectEntityKinds: readonly EntityKind[];
|
|
20
|
+
/** Every entity `definition` is built on, in declaration order. */
|
|
21
|
+
export declare function parentsOfDefinition(definition: EntityDefinition): readonly EntityId[];
|
|
22
|
+
/**
|
|
23
|
+
* Evaluates `definition` against its already-resolved parents, which must be
|
|
24
|
+
* in the order `parentsOfDefinition()` gave. `null` means "not on screen".
|
|
25
|
+
*
|
|
26
|
+
* A caller that could not resolve every parent should not call this at all:
|
|
27
|
+
* passing a short list would silently slide the parents that did resolve into
|
|
28
|
+
* the wrong positions.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveDefinition<D extends EntityDefinition>(definition: D, parents: readonly ResolvedEntity[]): ResolvedEntityOf<D['kind']> | null;
|
|
31
|
+
/**
|
|
32
|
+
* The resolved form of `definition` against points that have already been
|
|
33
|
+
* resolved for the scene it belongs to — `null` when it is not on screen.
|
|
34
|
+
*
|
|
35
|
+
* For the consumers that hold a definition and a point map rather than a
|
|
36
|
+
* context: `hitTest()` and `computeSnap()` are handed a scene assembled by a
|
|
37
|
+
* renderer, and a preview scene has no context to ask. A caller holding an
|
|
38
|
+
* `IndexedGeometryContext` asks that instead, because its answers are cached
|
|
39
|
+
* and these are computed per call.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveAgainstPoints(definition: EntityDefinition, points: ReadonlyMap<EntityId, Point>): ResolvedEntity | null;
|
|
42
|
+
/** What a renderer draws. */
|
|
43
|
+
export declare function shapeOfResolved(resolved: ResolvedEntity): ShapeDescriptor;
|
|
44
|
+
/** The two-point reduction the measurement seam accepts, or null. */
|
|
45
|
+
export declare function measuredOfResolved(resolved: ResolvedEntity): MeasuredObject | null;
|
|
46
|
+
/** Distance to the drawn object, in math space. */
|
|
47
|
+
export declare function distanceToResolved(resolved: ResolvedEntity, at: Point): number;
|
|
48
|
+
/** Rank at equal distance, lower wins. */
|
|
49
|
+
export declare function hitPriorityOf(kind: EntityKind): number;
|
|
50
|
+
/** The key deciding whether two definitions are the same construction. */
|
|
51
|
+
export declare function identityKeyOf(definition: EntityDefinition): string;
|
|
52
|
+
/**
|
|
53
|
+
* One sentence saying what this entity is, for the semantic companion (M1b.3).
|
|
54
|
+
*
|
|
55
|
+
* `nameOf` resolves a parent id to the name that surface calls it — the
|
|
56
|
+
* renderer passes `entityDisplayName()`, so "segment from A to B" names the
|
|
57
|
+
* two points the canvas has labelled `A` and `B`. A caller with no naming of
|
|
58
|
+
* its own may pass the identity function and get ids.
|
|
59
|
+
*/
|
|
60
|
+
export declare function describeDefinition(definition: EntityDefinition, nameOf: (id: EntityId) => string): string;
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/geometry/entities/index.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACV,gBAAgB,EAChB,QAAQ,EACR,UAAU,EAEV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,eAAe,EAChB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAKnE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEjF,eAAO,MAAM,cAAc,EAAE,cAK3B,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,UAAU,EAE5C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,UAAU,EAElD,CAAA;AAaD,mEAAmE;AACnE,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,gBAAgB,GAAG,SAAS,QAAQ,EAAE,CAErF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,gBAAgB,EAC1D,UAAU,EAAE,CAAC,EACb,OAAO,EAAE,SAAS,cAAc,EAAE,GACjC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAIpC;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,gBAAgB,EAC5B,MAAM,EAAE,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,GACnC,cAAc,GAAG,IAAI,CAWvB;AAED,6BAA6B;AAC7B,wBAAgB,eAAe,CAAC,QAAQ,EAAE,cAAc,GAAG,eAAe,CAEzE;AAED,qEAAqE;AACrE,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,GAAG,IAAI,CAElF;AAED,mDAAmD;AACnD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,EAAE,EAAE,EAAE,KAAK,GAAG,MAAM,CAE9E;AAED,0CAA0C;AAC1C,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAEtD;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,UAAU,EAAE,gBAAgB,GAAG,MAAM,CAElE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,gBAAgB,EAC5B,MAAM,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,MAAM,GAC/B,MAAM,CAER"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LineDefinition, ResolvedLine } from '../entityModel.cjs';
|
|
2
|
+
export declare const lineOperations: {
|
|
3
|
+
kind: "line";
|
|
4
|
+
parents: (definition: LineDefinition) => readonly [string, string];
|
|
5
|
+
resolve: (_definition: LineDefinition, [from, to]: readonly import('../entityModel.cjs').ResolvedEntity[]) => {
|
|
6
|
+
kind: "line";
|
|
7
|
+
through: [{
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}, {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}];
|
|
14
|
+
} | null;
|
|
15
|
+
toShape: (resolved: ResolvedLine) => {
|
|
16
|
+
shape: "line";
|
|
17
|
+
through: readonly [{
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}, {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}];
|
|
24
|
+
};
|
|
25
|
+
toMeasured: (resolved: ResolvedLine) => {
|
|
26
|
+
type: "line";
|
|
27
|
+
from: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
};
|
|
31
|
+
to: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
distanceTo: (resolved: ResolvedLine, at: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
}) => number;
|
|
40
|
+
describe: (definition: LineDefinition, nameOf: (id: import('../entityModel.cjs').EntityId) => string) => string;
|
|
41
|
+
hitPriority: number;
|
|
42
|
+
identityKey: (definition: LineDefinition) => string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LineDefinition, ResolvedLine } from '../entityModel.js';
|
|
2
|
+
export declare const lineOperations: {
|
|
3
|
+
kind: "line";
|
|
4
|
+
parents: (definition: LineDefinition) => readonly [string, string];
|
|
5
|
+
resolve: (_definition: LineDefinition, [from, to]: readonly import('../entityModel.js').ResolvedEntity[]) => {
|
|
6
|
+
kind: "line";
|
|
7
|
+
through: [{
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}, {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}];
|
|
14
|
+
} | null;
|
|
15
|
+
toShape: (resolved: ResolvedLine) => {
|
|
16
|
+
shape: "line";
|
|
17
|
+
through: readonly [{
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}, {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}];
|
|
24
|
+
};
|
|
25
|
+
toMeasured: (resolved: ResolvedLine) => {
|
|
26
|
+
type: "line";
|
|
27
|
+
from: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
};
|
|
31
|
+
to: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
distanceTo: (resolved: ResolvedLine, at: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
}) => number;
|
|
40
|
+
describe: (definition: LineDefinition, nameOf: (id: import('../entityModel.js').EntityId) => string) => string;
|
|
41
|
+
hitPriority: number;
|
|
42
|
+
identityKey: (definition: LineDefinition) => string;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=line.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../src/geometry/entities/line.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAoB,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAEpF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B+B,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EntityId, PointDefinition, ResolvedPoint } from '../entityModel.cjs';
|
|
2
|
+
export declare const pointOperations: {
|
|
3
|
+
kind: "point";
|
|
4
|
+
parents: (definition: PointDefinition) => readonly string[];
|
|
5
|
+
resolve: (definition: PointDefinition, parents: readonly import('../entityModel.cjs').ResolvedEntity[]) => {
|
|
6
|
+
kind: "point";
|
|
7
|
+
at: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
} | null;
|
|
12
|
+
toShape: (resolved: ResolvedPoint) => {
|
|
13
|
+
shape: "point";
|
|
14
|
+
at: {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
toMeasured: () => null;
|
|
20
|
+
distanceTo: (resolved: ResolvedPoint, at: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}) => number;
|
|
24
|
+
describe: (definition: PointDefinition, nameOf: (id: EntityId) => string) => string;
|
|
25
|
+
hitPriority: number;
|
|
26
|
+
identityKey: (definition: PointDefinition) => string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EntityId, PointDefinition, ResolvedPoint } from '../entityModel.js';
|
|
2
|
+
export declare const pointOperations: {
|
|
3
|
+
kind: "point";
|
|
4
|
+
parents: (definition: PointDefinition) => readonly string[];
|
|
5
|
+
resolve: (definition: PointDefinition, parents: readonly import('../entityModel.js').ResolvedEntity[]) => {
|
|
6
|
+
kind: "point";
|
|
7
|
+
at: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
} | null;
|
|
12
|
+
toShape: (resolved: ResolvedPoint) => {
|
|
13
|
+
shape: "point";
|
|
14
|
+
at: {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
toMeasured: () => null;
|
|
20
|
+
distanceTo: (resolved: ResolvedPoint, at: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}) => number;
|
|
24
|
+
describe: (definition: PointDefinition, nameOf: (id: EntityId) => string) => string;
|
|
25
|
+
hitPriority: number;
|
|
26
|
+
identityKey: (definition: PointDefinition) => string;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=point.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/geometry/entities/point.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAoB,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAYhG,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CAsEgC,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ResolvedEntity } from '../entityModel.cjs';
|
|
2
|
+
import { Point } from '../point.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* Where two resolved entities meet, or null when they do not meet at all,
|
|
5
|
+
* meet only outside a segment's bounds, or are a pair no intersection is
|
|
6
|
+
* defined for.
|
|
7
|
+
*
|
|
8
|
+
* The lookup erases the pair's concrete operand types at one explicit
|
|
9
|
+
* boundary, exactly as `getGoalKindHandler()` erases a goal's subtype: the
|
|
10
|
+
* key is built from the operands' own `kind` fields, so the entry selected is
|
|
11
|
+
* by construction the one whose signature they satisfy.
|
|
12
|
+
*/
|
|
13
|
+
export declare function intersectEntities(first: ResolvedEntity, second: ResolvedEntity, which?: 0 | 1): Point | null;
|
|
14
|
+
/**
|
|
15
|
+
* The position at parameter `t` along `host`, or null when the host is not
|
|
16
|
+
* something a parameter can travel along.
|
|
17
|
+
*/
|
|
18
|
+
export declare function pointOnEntity(host: ResolvedEntity, t: number): Point | null;
|
|
19
|
+
/**
|
|
20
|
+
* The parameter at which `at` projects onto `host`, in the domain the host
|
|
21
|
+
* actually occupies — or null when the host cannot be parameterized, or is
|
|
22
|
+
* degenerate at the scale of the query.
|
|
23
|
+
*
|
|
24
|
+
* `pointOnEntity(host, parameterOnEntity(host, at))` is the closest place on
|
|
25
|
+
* `host` to `at`, which is why the two live side by side.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parameterOnEntity(host: ResolvedEntity, at: Point): number | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ResolvedEntity } from '../entityModel.js';
|
|
2
|
+
import { Point } from '../point.js';
|
|
3
|
+
/**
|
|
4
|
+
* Where two resolved entities meet, or null when they do not meet at all,
|
|
5
|
+
* meet only outside a segment's bounds, or are a pair no intersection is
|
|
6
|
+
* defined for.
|
|
7
|
+
*
|
|
8
|
+
* The lookup erases the pair's concrete operand types at one explicit
|
|
9
|
+
* boundary, exactly as `getGoalKindHandler()` erases a goal's subtype: the
|
|
10
|
+
* key is built from the operands' own `kind` fields, so the entry selected is
|
|
11
|
+
* by construction the one whose signature they satisfy.
|
|
12
|
+
*/
|
|
13
|
+
export declare function intersectEntities(first: ResolvedEntity, second: ResolvedEntity, which?: 0 | 1): Point | null;
|
|
14
|
+
/**
|
|
15
|
+
* The position at parameter `t` along `host`, or null when the host is not
|
|
16
|
+
* something a parameter can travel along.
|
|
17
|
+
*/
|
|
18
|
+
export declare function pointOnEntity(host: ResolvedEntity, t: number): Point | null;
|
|
19
|
+
/**
|
|
20
|
+
* The parameter at which `at` projects onto `host`, in the domain the host
|
|
21
|
+
* actually occupies — or null when the host cannot be parameterized, or is
|
|
22
|
+
* degenerate at the scale of the query.
|
|
23
|
+
*
|
|
24
|
+
* `pointOnEntity(host, parameterOnEntity(host, at))` is the closest place on
|
|
25
|
+
* `host` to `at`, which is why the two live side by side.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parameterOnEntity(host: ResolvedEntity, at: Point): number | null;
|
|
28
|
+
//# sourceMappingURL=relations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relations.d.ts","sourceRoot":"","sources":["../../../src/geometry/entities/relations.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAGV,cAAc,EAIf,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAoFrC;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,cAAc,EACtB,KAAK,GAAE,CAAC,GAAG,CAAK,GACf,KAAK,GAAG,IAAI,CAMd;AAqDD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAM3E;AAqCD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAGhF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ResolvedSegment, SegmentDefinition } from '../entityModel.cjs';
|
|
2
|
+
export declare const segmentOperations: {
|
|
3
|
+
kind: "segment";
|
|
4
|
+
parents: (definition: SegmentDefinition) => readonly [string, string];
|
|
5
|
+
resolve: (_definition: SegmentDefinition, [from, to]: readonly import('../entityModel.cjs').ResolvedEntity[]) => {
|
|
6
|
+
kind: "segment";
|
|
7
|
+
from: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
to: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
} | null;
|
|
16
|
+
toShape: (resolved: ResolvedSegment) => {
|
|
17
|
+
shape: "segment";
|
|
18
|
+
from: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
to: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
toMeasured: (resolved: ResolvedSegment) => {
|
|
28
|
+
type: "segment";
|
|
29
|
+
from: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
};
|
|
33
|
+
to: {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
distanceTo: (resolved: ResolvedSegment, at: {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
}) => number;
|
|
42
|
+
describe: (definition: SegmentDefinition, nameOf: (id: import('../entityModel.cjs').EntityId) => string) => string;
|
|
43
|
+
hitPriority: number;
|
|
44
|
+
identityKey: (definition: SegmentDefinition) => string;
|
|
45
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ResolvedSegment, SegmentDefinition } from '../entityModel.js';
|
|
2
|
+
export declare const segmentOperations: {
|
|
3
|
+
kind: "segment";
|
|
4
|
+
parents: (definition: SegmentDefinition) => readonly [string, string];
|
|
5
|
+
resolve: (_definition: SegmentDefinition, [from, to]: readonly import('../entityModel.js').ResolvedEntity[]) => {
|
|
6
|
+
kind: "segment";
|
|
7
|
+
from: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
to: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
} | null;
|
|
16
|
+
toShape: (resolved: ResolvedSegment) => {
|
|
17
|
+
shape: "segment";
|
|
18
|
+
from: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
to: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
toMeasured: (resolved: ResolvedSegment) => {
|
|
28
|
+
type: "segment";
|
|
29
|
+
from: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
};
|
|
33
|
+
to: {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
distanceTo: (resolved: ResolvedSegment, at: {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
}) => number;
|
|
42
|
+
describe: (definition: SegmentDefinition, nameOf: (id: import('../entityModel.js').EntityId) => string) => string;
|
|
43
|
+
hitPriority: number;
|
|
44
|
+
identityKey: (definition: SegmentDefinition) => string;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=segment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment.d.ts","sourceRoot":"","sources":["../../../src/geometry/entities/segment.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAoB,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAE1F,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BkC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityCapabilities.d.ts","sourceRoot":"","sources":["../../src/geometry/entityCapabilities.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAcnE,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAE7E"}
|