@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.
Files changed (380) hide show
  1. package/README.md +1101 -0
  2. package/dist/coordinates/grid.d.cts +8 -0
  3. package/dist/coordinates/grid.d.ts +9 -0
  4. package/dist/coordinates/grid.d.ts.map +1 -0
  5. package/dist/coordinates/lineClipping.d.cts +3 -0
  6. package/dist/coordinates/lineClipping.d.ts +4 -0
  7. package/dist/coordinates/lineClipping.d.ts.map +1 -0
  8. package/dist/coordinates/transform.d.cts +18 -0
  9. package/dist/coordinates/transform.d.ts +19 -0
  10. package/dist/coordinates/transform.d.ts.map +1 -0
  11. package/dist/core.cjs +1 -0
  12. package/dist/core.mjs +4 -0
  13. package/dist/entries/core.d.cts +16 -0
  14. package/dist/entries/core.d.ts +17 -0
  15. package/dist/entries/core.d.ts.map +1 -0
  16. package/dist/entries/react.d.cts +18 -0
  17. package/dist/entries/react.d.ts +19 -0
  18. package/dist/entries/react.d.ts.map +1 -0
  19. package/dist/entries/schemas.d.cts +14 -0
  20. package/dist/entries/schemas.d.ts +15 -0
  21. package/dist/entries/schemas.d.ts.map +1 -0
  22. package/dist/entries/validation.d.cts +12 -0
  23. package/dist/entries/validation.d.ts +13 -0
  24. package/dist/entries/validation.d.ts.map +1 -0
  25. package/dist/exercise.schema-BV2b7rtN.cjs +2 -0
  26. package/dist/exercise.schema-BV2b7rtN.cjs.map +1 -0
  27. package/dist/exercise.schema-ckVBW9XA.js +212 -0
  28. package/dist/exercise.schema-ckVBW9XA.js.map +1 -0
  29. package/dist/geometry/distance.d.cts +9 -0
  30. package/dist/geometry/distance.d.ts +10 -0
  31. package/dist/geometry/distance.d.ts.map +1 -0
  32. package/dist/geometry/entities/circle.d.cts +36 -0
  33. package/dist/geometry/entities/circle.d.ts +37 -0
  34. package/dist/geometry/entities/circle.d.ts.map +1 -0
  35. package/dist/geometry/entities/index.d.cts +60 -0
  36. package/dist/geometry/entities/index.d.ts +61 -0
  37. package/dist/geometry/entities/index.d.ts.map +1 -0
  38. package/dist/geometry/entities/line.d.cts +43 -0
  39. package/dist/geometry/entities/line.d.ts +44 -0
  40. package/dist/geometry/entities/line.d.ts.map +1 -0
  41. package/dist/geometry/entities/point.d.cts +27 -0
  42. package/dist/geometry/entities/point.d.ts +28 -0
  43. package/dist/geometry/entities/point.d.ts.map +1 -0
  44. package/dist/geometry/entities/relations.d.cts +27 -0
  45. package/dist/geometry/entities/relations.d.ts +28 -0
  46. package/dist/geometry/entities/relations.d.ts.map +1 -0
  47. package/dist/geometry/entities/segment.d.cts +45 -0
  48. package/dist/geometry/entities/segment.d.ts +46 -0
  49. package/dist/geometry/entities/segment.d.ts.map +1 -0
  50. package/dist/geometry/entityCapabilities.d.cts +2 -0
  51. package/dist/geometry/entityCapabilities.d.ts +3 -0
  52. package/dist/geometry/entityCapabilities.d.ts.map +1 -0
  53. package/dist/geometry/entityModel.d.cts +139 -0
  54. package/dist/geometry/entityModel.d.ts +140 -0
  55. package/dist/geometry/entityModel.d.ts.map +1 -0
  56. package/dist/geometry/entityRecord.d.cts +27 -0
  57. package/dist/geometry/entityRecord.d.ts +28 -0
  58. package/dist/geometry/entityRecord.d.ts.map +1 -0
  59. package/dist/geometry/evaluateGraph.d.cts +37 -0
  60. package/dist/geometry/evaluateGraph.d.ts +38 -0
  61. package/dist/geometry/evaluateGraph.d.ts.map +1 -0
  62. package/dist/geometry/geometryObject.d.cts +4 -0
  63. package/dist/geometry/geometryObject.d.ts +5 -0
  64. package/dist/geometry/geometryObject.d.ts.map +1 -0
  65. package/dist/geometry/goalCandidate.d.cts +8 -0
  66. package/dist/geometry/goalCandidate.d.ts +9 -0
  67. package/dist/geometry/goalCandidate.d.ts.map +1 -0
  68. package/dist/geometry/hitTest.d.cts +23 -0
  69. package/dist/geometry/hitTest.d.ts +24 -0
  70. package/dist/geometry/hitTest.d.ts.map +1 -0
  71. package/dist/geometry/point.d.cts +5 -0
  72. package/dist/geometry/point.d.ts +6 -0
  73. package/dist/geometry/point.d.ts.map +1 -0
  74. package/dist/geometry/pointOrigin.d.cts +5 -0
  75. package/dist/geometry/pointOrigin.d.ts +6 -0
  76. package/dist/geometry/pointOrigin.d.ts.map +1 -0
  77. package/dist/geometry/v1Bridge.d.cts +41 -0
  78. package/dist/geometry/v1Bridge.d.ts +42 -0
  79. package/dist/geometry/v1Bridge.d.ts.map +1 -0
  80. package/dist/geometryAttemptStatus-5L_q6-9l.js +184 -0
  81. package/dist/geometryAttemptStatus-5L_q6-9l.js.map +1 -0
  82. package/dist/geometryAttemptStatus-N_XHIkiS.cjs +2 -0
  83. package/dist/geometryAttemptStatus-N_XHIkiS.cjs.map +1 -0
  84. package/dist/geometryState.schema-D0ixyGYE.js +955 -0
  85. package/dist/geometryState.schema-D0ixyGYE.js.map +1 -0
  86. package/dist/geometryState.schema-DKQ-durx.cjs +2 -0
  87. package/dist/geometryState.schema-DKQ-durx.cjs.map +1 -0
  88. package/dist/goals-C3ZwbEh_.js +451 -0
  89. package/dist/goals-C3ZwbEh_.js.map +1 -0
  90. package/dist/goals-CxR5qPDC.cjs +2 -0
  91. package/dist/goals-CxR5qPDC.cjs.map +1 -0
  92. package/dist/index.cjs +1 -0
  93. package/dist/index.d.cts +4 -0
  94. package/dist/index.d.ts +5 -0
  95. package/dist/index.d.ts.map +1 -0
  96. package/dist/index.mjs +10 -0
  97. package/dist/measure/geometryAdapter.d.cts +26 -0
  98. package/dist/measure/geometryAdapter.d.ts +27 -0
  99. package/dist/measure/geometryAdapter.d.ts.map +1 -0
  100. package/dist/measure/kernel.d.cts +25 -0
  101. package/dist/measure/kernel.d.ts +26 -0
  102. package/dist/measure/kernel.d.ts.map +1 -0
  103. package/dist/numerics/policy.d.cts +17 -0
  104. package/dist/numerics/policy.d.ts +18 -0
  105. package/dist/numerics/policy.d.ts.map +1 -0
  106. package/dist/react-BEcdx1f6.js +1851 -0
  107. package/dist/react-BEcdx1f6.js.map +1 -0
  108. package/dist/react-Pp_VSk--.cjs +2 -0
  109. package/dist/react-Pp_VSk--.cjs.map +1 -0
  110. package/dist/react.cjs +1 -0
  111. package/dist/react.mjs +2 -0
  112. package/dist/renderer/GeometryCanvas.d.cts +14 -0
  113. package/dist/renderer/GeometryCanvas.d.ts +15 -0
  114. package/dist/renderer/GeometryCanvas.d.ts.map +1 -0
  115. package/dist/renderer/GeometryCompanion.d.cts +29 -0
  116. package/dist/renderer/GeometryCompanion.d.ts +30 -0
  117. package/dist/renderer/GeometryCompanion.d.ts.map +1 -0
  118. package/dist/renderer/GeometryGrid.d.cts +7 -0
  119. package/dist/renderer/GeometryGrid.d.ts +8 -0
  120. package/dist/renderer/GeometryGrid.d.ts.map +1 -0
  121. package/dist/renderer/GeometryInstruments.d.cts +7 -0
  122. package/dist/renderer/GeometryInstruments.d.ts +8 -0
  123. package/dist/renderer/GeometryInstruments.d.ts.map +1 -0
  124. package/dist/renderer/StudentGeometryCanvas.d.cts +11 -0
  125. package/dist/renderer/StudentGeometryCanvas.d.ts +12 -0
  126. package/dist/renderer/StudentGeometryCanvas.d.ts.map +1 -0
  127. package/dist/renderer/StudentGeometryExercise.d.cts +36 -0
  128. package/dist/renderer/StudentGeometryExercise.d.ts +37 -0
  129. package/dist/renderer/StudentGeometryExercise.d.ts.map +1 -0
  130. package/dist/renderer/Toolbar.d.cts +7 -0
  131. package/dist/renderer/Toolbar.d.ts +8 -0
  132. package/dist/renderer/Toolbar.d.ts.map +1 -0
  133. package/dist/renderer/deriveRenderableGeometry.d.cts +15 -0
  134. package/dist/renderer/deriveRenderableGeometry.d.ts +16 -0
  135. package/dist/renderer/deriveRenderableGeometry.d.ts.map +1 -0
  136. package/dist/renderer/deriveSemanticScene.d.cts +58 -0
  137. package/dist/renderer/deriveSemanticScene.d.ts +59 -0
  138. package/dist/renderer/deriveSemanticScene.d.ts.map +1 -0
  139. package/dist/renderer/entityDisplayName.d.cts +12 -0
  140. package/dist/renderer/entityDisplayName.d.ts +13 -0
  141. package/dist/renderer/entityDisplayName.d.ts.map +1 -0
  142. package/dist/renderer/gesturePolicy.d.cts +97 -0
  143. package/dist/renderer/gesturePolicy.d.ts +98 -0
  144. package/dist/renderer/gesturePolicy.d.ts.map +1 -0
  145. package/dist/renderer/shapes/CircleShape.d.cts +17 -0
  146. package/dist/renderer/shapes/CircleShape.d.ts +18 -0
  147. package/dist/renderer/shapes/CircleShape.d.ts.map +1 -0
  148. package/dist/renderer/shapes/EntityLabel.d.cts +14 -0
  149. package/dist/renderer/shapes/EntityLabel.d.ts +15 -0
  150. package/dist/renderer/shapes/EntityLabel.d.ts.map +1 -0
  151. package/dist/renderer/shapes/EntityShape.d.cts +18 -0
  152. package/dist/renderer/shapes/EntityShape.d.ts +19 -0
  153. package/dist/renderer/shapes/EntityShape.d.ts.map +1 -0
  154. package/dist/renderer/shapes/LineShape.d.cts +16 -0
  155. package/dist/renderer/shapes/LineShape.d.ts +17 -0
  156. package/dist/renderer/shapes/LineShape.d.ts.map +1 -0
  157. package/dist/renderer/shapes/PointShape.d.cts +17 -0
  158. package/dist/renderer/shapes/PointShape.d.ts +18 -0
  159. package/dist/renderer/shapes/PointShape.d.ts.map +1 -0
  160. package/dist/renderer/shapes/SegmentShape.d.cts +17 -0
  161. package/dist/renderer/shapes/SegmentShape.d.ts +18 -0
  162. package/dist/renderer/shapes/SegmentShape.d.ts.map +1 -0
  163. package/dist/renderer/shapes/SnapMarker.d.cts +8 -0
  164. package/dist/renderer/shapes/SnapMarker.d.ts +9 -0
  165. package/dist/renderer/shapes/SnapMarker.d.ts.map +1 -0
  166. package/dist/renderer/shapes/StrokedLine.d.cts +18 -0
  167. package/dist/renderer/shapes/StrokedLine.d.ts +19 -0
  168. package/dist/renderer/shapes/StrokedLine.d.ts.map +1 -0
  169. package/dist/renderer/studentExerciseSession.d.cts +71 -0
  170. package/dist/renderer/studentExerciseSession.d.ts +72 -0
  171. package/dist/renderer/studentExerciseSession.d.ts.map +1 -0
  172. package/dist/renderer/useConnectionPreview.d.cts +44 -0
  173. package/dist/renderer/useConnectionPreview.d.ts +45 -0
  174. package/dist/renderer/useConnectionPreview.d.ts.map +1 -0
  175. package/dist/renderer/usePlacementSnap.d.cts +28 -0
  176. package/dist/renderer/usePlacementSnap.d.ts +29 -0
  177. package/dist/renderer/usePlacementSnap.d.ts.map +1 -0
  178. package/dist/renderer/usePointerGestures.d.cts +46 -0
  179. package/dist/renderer/usePointerGestures.d.ts +47 -0
  180. package/dist/renderer/usePointerGestures.d.ts.map +1 -0
  181. package/dist/schemas/circle.schema.d.cts +8 -0
  182. package/dist/schemas/circle.schema.d.ts +9 -0
  183. package/dist/schemas/circle.schema.d.ts.map +1 -0
  184. package/dist/schemas/entityDefinition.schema.d.cts +69 -0
  185. package/dist/schemas/entityDefinition.schema.d.ts +70 -0
  186. package/dist/schemas/entityDefinition.schema.d.ts.map +1 -0
  187. package/dist/schemas/entityDocument.d.cts +95 -0
  188. package/dist/schemas/entityDocument.d.ts +96 -0
  189. package/dist/schemas/entityDocument.d.ts.map +1 -0
  190. package/dist/schemas/entityPresentation.schema.d.cts +12 -0
  191. package/dist/schemas/entityPresentation.schema.d.ts +13 -0
  192. package/dist/schemas/entityPresentation.schema.d.ts.map +1 -0
  193. package/dist/schemas/exercise.schema.d.cts +217 -0
  194. package/dist/schemas/exercise.schema.d.ts +218 -0
  195. package/dist/schemas/exercise.schema.d.ts.map +1 -0
  196. package/dist/schemas/exerciseProjection.d.cts +10 -0
  197. package/dist/schemas/exerciseProjection.d.ts +11 -0
  198. package/dist/schemas/exerciseProjection.d.ts.map +1 -0
  199. package/dist/schemas/exerciseV2.schema.d.cts +137 -0
  200. package/dist/schemas/exerciseV2.schema.d.ts +138 -0
  201. package/dist/schemas/exerciseV2.schema.d.ts.map +1 -0
  202. package/dist/schemas/exerciseV3.schema.d.cts +149 -0
  203. package/dist/schemas/exerciseV3.schema.d.ts +150 -0
  204. package/dist/schemas/exerciseV3.schema.d.ts.map +1 -0
  205. package/dist/schemas/geometryObject.schema.d.cts +17 -0
  206. package/dist/schemas/geometryObject.schema.d.ts +18 -0
  207. package/dist/schemas/geometryObject.schema.d.ts.map +1 -0
  208. package/dist/schemas/geometryState.schema.d.cts +64 -0
  209. package/dist/schemas/geometryState.schema.d.ts +65 -0
  210. package/dist/schemas/geometryState.schema.d.ts.map +1 -0
  211. package/dist/schemas/givenElement.schema.d.cts +24 -0
  212. package/dist/schemas/givenElement.schema.d.ts +25 -0
  213. package/dist/schemas/givenElement.schema.d.ts.map +1 -0
  214. package/dist/schemas/goals/createGoal.schema.d.cts +12 -0
  215. package/dist/schemas/goals/createGoal.schema.d.ts +13 -0
  216. package/dist/schemas/goals/createGoal.schema.d.ts.map +1 -0
  217. package/dist/schemas/goals/geometryGoal.schema.d.cts +58 -0
  218. package/dist/schemas/goals/geometryGoal.schema.d.ts +59 -0
  219. package/dist/schemas/goals/geometryGoal.schema.d.ts.map +1 -0
  220. package/dist/schemas/goals/goalKindDeclaration.d.cts +53 -0
  221. package/dist/schemas/goals/goalKindDeclaration.d.ts +54 -0
  222. package/dist/schemas/goals/goalKindDeclaration.d.ts.map +1 -0
  223. package/dist/schemas/goals/midpointGoal.schema.d.cts +9 -0
  224. package/dist/schemas/goals/midpointGoal.schema.d.ts +10 -0
  225. package/dist/schemas/goals/midpointGoal.schema.d.ts.map +1 -0
  226. package/dist/schemas/goals/parallelGoal.schema.d.cts +15 -0
  227. package/dist/schemas/goals/parallelGoal.schema.d.ts +16 -0
  228. package/dist/schemas/goals/parallelGoal.schema.d.ts.map +1 -0
  229. package/dist/schemas/goals/perpendicularGoal.schema.d.cts +15 -0
  230. package/dist/schemas/goals/perpendicularGoal.schema.d.ts +16 -0
  231. package/dist/schemas/goals/perpendicularGoal.schema.d.ts.map +1 -0
  232. package/dist/schemas/goals/segmentLengthGoal.schema.d.cts +9 -0
  233. package/dist/schemas/goals/segmentLengthGoal.schema.d.ts +10 -0
  234. package/dist/schemas/goals/segmentLengthGoal.schema.d.ts.map +1 -0
  235. package/dist/schemas/goals/throughPointsGoal.schema.d.cts +13 -0
  236. package/dist/schemas/goals/throughPointsGoal.schema.d.ts +14 -0
  237. package/dist/schemas/goals/throughPointsGoal.schema.d.ts.map +1 -0
  238. package/dist/schemas/identifier.schema.d.cts +2 -0
  239. package/dist/schemas/identifier.schema.d.ts +3 -0
  240. package/dist/schemas/identifier.schema.d.ts.map +1 -0
  241. package/dist/schemas/line.schema.d.cts +7 -0
  242. package/dist/schemas/line.schema.d.ts +8 -0
  243. package/dist/schemas/line.schema.d.ts.map +1 -0
  244. package/dist/schemas/migrate.d.cts +21 -0
  245. package/dist/schemas/migrate.d.ts +22 -0
  246. package/dist/schemas/migrate.d.ts.map +1 -0
  247. package/dist/schemas/objectTypeName.schema.d.cts +8 -0
  248. package/dist/schemas/objectTypeName.schema.d.ts +9 -0
  249. package/dist/schemas/objectTypeName.schema.d.ts.map +1 -0
  250. package/dist/schemas/point.schema.d.cts +15 -0
  251. package/dist/schemas/point.schema.d.ts +16 -0
  252. package/dist/schemas/point.schema.d.ts.map +1 -0
  253. package/dist/schemas/pointOrigin.schema.d.cts +25 -0
  254. package/dist/schemas/pointOrigin.schema.d.ts +26 -0
  255. package/dist/schemas/pointOrigin.schema.d.ts.map +1 -0
  256. package/dist/schemas/segment.schema.d.cts +8 -0
  257. package/dist/schemas/segment.schema.d.ts +9 -0
  258. package/dist/schemas/segment.schema.d.ts.map +1 -0
  259. package/dist/schemas/v1ToV2.d.cts +37 -0
  260. package/dist/schemas/v1ToV2.d.ts +38 -0
  261. package/dist/schemas/v1ToV2.d.ts.map +1 -0
  262. package/dist/schemas/v2ToV3.d.cts +37 -0
  263. package/dist/schemas/v2ToV3.d.ts +38 -0
  264. package/dist/schemas/v2ToV3.d.ts.map +1 -0
  265. package/dist/schemas/v3ToV4.d.cts +3 -0
  266. package/dist/schemas/v3ToV4.d.ts +4 -0
  267. package/dist/schemas/v3ToV4.d.ts.map +1 -0
  268. package/dist/schemas/viewport.schema.d.cts +3 -0
  269. package/dist/schemas/viewport.schema.d.ts +4 -0
  270. package/dist/schemas/viewport.schema.d.ts.map +1 -0
  271. package/dist/schemas.cjs +1 -0
  272. package/dist/schemas.mjs +3 -0
  273. package/dist/snapping/computeSnap.d.cts +30 -0
  274. package/dist/snapping/computeSnap.d.ts +31 -0
  275. package/dist/snapping/computeSnap.d.ts.map +1 -0
  276. package/dist/state/geometryContext.d.cts +40 -0
  277. package/dist/state/geometryContext.d.ts +41 -0
  278. package/dist/state/geometryContext.d.ts.map +1 -0
  279. package/dist/state/resolvePoints.d.cts +51 -0
  280. package/dist/state/resolvePoints.d.ts +52 -0
  281. package/dist/state/resolvePoints.d.ts.map +1 -0
  282. package/dist/store/attemptChange.d.cts +30 -0
  283. package/dist/store/attemptChange.d.ts +31 -0
  284. package/dist/store/attemptChange.d.ts.map +1 -0
  285. package/dist/store/constructionCommand.d.cts +35 -0
  286. package/dist/store/constructionCommand.d.ts +36 -0
  287. package/dist/store/constructionCommand.d.ts.map +1 -0
  288. package/dist/store/constructionIdentity.d.cts +21 -0
  289. package/dist/store/constructionIdentity.d.ts +22 -0
  290. package/dist/store/constructionIdentity.d.ts.map +1 -0
  291. package/dist/store/createStore.d.cts +6 -0
  292. package/dist/store/createStore.d.ts +7 -0
  293. package/dist/store/createStore.d.ts.map +1 -0
  294. package/dist/store/history.d.cts +2 -0
  295. package/dist/store/history.d.ts +3 -0
  296. package/dist/store/history.d.ts.map +1 -0
  297. package/dist/store/studentStore.d.cts +151 -0
  298. package/dist/store/studentStore.d.ts +152 -0
  299. package/dist/store/studentStore.d.ts.map +1 -0
  300. package/dist/store/teacherStore.d.cts +111 -0
  301. package/dist/store/teacherStore.d.ts +112 -0
  302. package/dist/store/teacherStore.d.ts.map +1 -0
  303. package/dist/store/useStoreState.d.cts +2 -0
  304. package/dist/store/useStoreState.d.ts +3 -0
  305. package/dist/store/useStoreState.d.ts.map +1 -0
  306. package/dist/studentStore-CEKTtMCh.js +1162 -0
  307. package/dist/studentStore-CEKTtMCh.js.map +1 -0
  308. package/dist/studentStore-DLftfFAl.cjs +2 -0
  309. package/dist/studentStore-DLftfFAl.cjs.map +1 -0
  310. package/dist/validation/checkGeometryAnswer.d.cts +63 -0
  311. package/dist/validation/checkGeometryAnswer.d.ts +64 -0
  312. package/dist/validation/checkGeometryAnswer.d.ts.map +1 -0
  313. package/dist/validation/deriveGeometryCanvasFeedback.d.cts +7 -0
  314. package/dist/validation/deriveGeometryCanvasFeedback.d.ts +8 -0
  315. package/dist/validation/deriveGeometryCanvasFeedback.d.ts.map +1 -0
  316. package/dist/validation/exerciseLoad.d.cts +29 -0
  317. package/dist/validation/exerciseLoad.d.ts +30 -0
  318. package/dist/validation/exerciseLoad.d.ts.map +1 -0
  319. package/dist/validation/geometryAttemptStatus.d.cts +23 -0
  320. package/dist/validation/geometryAttemptStatus.d.ts +24 -0
  321. package/dist/validation/geometryAttemptStatus.d.ts.map +1 -0
  322. package/dist/validation/getGeometryExerciseWarnings.d.cts +16 -0
  323. package/dist/validation/getGeometryExerciseWarnings.d.ts +17 -0
  324. package/dist/validation/getGeometryExerciseWarnings.d.ts.map +1 -0
  325. package/dist/validation/goals/create.d.cts +3 -0
  326. package/dist/validation/goals/create.d.ts +4 -0
  327. package/dist/validation/goals/create.d.ts.map +1 -0
  328. package/dist/validation/goals/goalContext.d.cts +44 -0
  329. package/dist/validation/goals/goalContext.d.ts +45 -0
  330. package/dist/validation/goals/goalContext.d.ts.map +1 -0
  331. package/dist/validation/goals/goalKindHandler.d.cts +26 -0
  332. package/dist/validation/goals/goalKindHandler.d.ts +27 -0
  333. package/dist/validation/goals/goalKindHandler.d.ts.map +1 -0
  334. package/dist/validation/goals/index.d.cts +14 -0
  335. package/dist/validation/goals/index.d.ts +15 -0
  336. package/dist/validation/goals/index.d.ts.map +1 -0
  337. package/dist/validation/goals/midpoint.d.cts +4 -0
  338. package/dist/validation/goals/midpoint.d.ts +5 -0
  339. package/dist/validation/goals/midpoint.d.ts.map +1 -0
  340. package/dist/validation/goals/parallel.d.cts +3 -0
  341. package/dist/validation/goals/parallel.d.ts +4 -0
  342. package/dist/validation/goals/parallel.d.ts.map +1 -0
  343. package/dist/validation/goals/perpendicular.d.cts +3 -0
  344. package/dist/validation/goals/perpendicular.d.ts +4 -0
  345. package/dist/validation/goals/perpendicular.d.ts.map +1 -0
  346. package/dist/validation/goals/previewGeometry.d.cts +9 -0
  347. package/dist/validation/goals/previewGeometry.d.ts +10 -0
  348. package/dist/validation/goals/previewGeometry.d.ts.map +1 -0
  349. package/dist/validation/goals/segmentLength.d.cts +3 -0
  350. package/dist/validation/goals/segmentLength.d.ts +4 -0
  351. package/dist/validation/goals/segmentLength.d.ts.map +1 -0
  352. package/dist/validation/goals/throughPoints.d.cts +5 -0
  353. package/dist/validation/goals/throughPoints.d.ts +6 -0
  354. package/dist/validation/goals/throughPoints.d.ts.map +1 -0
  355. package/dist/validation/gradingFingerprints.d.cts +4 -0
  356. package/dist/validation/gradingFingerprints.d.ts +5 -0
  357. package/dist/validation/gradingFingerprints.d.ts.map +1 -0
  358. package/dist/validation/revealGeometryAnswers.d.cts +3 -0
  359. package/dist/validation/revealGeometryAnswers.d.ts +4 -0
  360. package/dist/validation/revealGeometryAnswers.d.ts.map +1 -0
  361. package/dist/validation/revealGeometryAttempt.d.cts +36 -0
  362. package/dist/validation/revealGeometryAttempt.d.ts +37 -0
  363. package/dist/validation/revealGeometryAttempt.d.ts.map +1 -0
  364. package/dist/validation/types.d.cts +58 -0
  365. package/dist/validation/types.d.ts +59 -0
  366. package/dist/validation/types.d.ts.map +1 -0
  367. package/dist/validation/validateGeometryExercise.d.cts +30 -0
  368. package/dist/validation/validateGeometryExercise.d.ts +31 -0
  369. package/dist/validation/validateGeometryExercise.d.ts.map +1 -0
  370. package/dist/validation/validateGeometryState.d.cts +16 -0
  371. package/dist/validation/validateGeometryState.d.ts +17 -0
  372. package/dist/validation/validateGeometryState.d.ts.map +1 -0
  373. package/dist/validation/validateGeometryStateInput.d.cts +22 -0
  374. package/dist/validation/validateGeometryStateInput.d.ts +23 -0
  375. package/dist/validation/validateGeometryStateInput.d.ts.map +1 -0
  376. package/dist/validation.cjs +2 -0
  377. package/dist/validation.cjs.map +1 -0
  378. package/dist/validation.mjs +269 -0
  379. package/dist/validation.mjs.map +1 -0
  380. package/package.json +150 -0
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const midpointGoalSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"midpoint">;
5
+ objectType: z.ZodLiteral<"point">;
6
+ referenceObjectId: z.ZodString;
7
+ toleranceUnits: z.ZodNumber;
8
+ }, z.core.$strict>;
9
+ export type MidpointGoal = z.infer<typeof midpointGoalSchema>;
10
+ //# sourceMappingURL=midpointGoal.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"midpointGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/midpointGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,kBAAkB;;;;;;kBAWpB,CAAA;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const parallelGoalSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"parallel">;
5
+ objectType: z.ZodEnum<{
6
+ point: "point";
7
+ segment: "segment";
8
+ line: "line";
9
+ circle: "circle";
10
+ }>;
11
+ referenceObjectId: z.ZodString;
12
+ throughPointId: z.ZodString;
13
+ toleranceDegrees: z.ZodNumber;
14
+ }, z.core.$strict>;
15
+ export type ParallelGoal = z.infer<typeof parallelGoalSchema>;
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const parallelGoalSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"parallel">;
5
+ objectType: z.ZodEnum<{
6
+ point: "point";
7
+ segment: "segment";
8
+ line: "line";
9
+ circle: "circle";
10
+ }>;
11
+ referenceObjectId: z.ZodString;
12
+ throughPointId: z.ZodString;
13
+ toleranceDegrees: z.ZodNumber;
14
+ }, z.core.$strict>;
15
+ export type ParallelGoal = z.infer<typeof parallelGoalSchema>;
16
+ //# sourceMappingURL=parallelGoal.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parallelGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/parallelGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;kBASpB,CAAA;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const perpendicularGoalSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"perpendicular">;
5
+ objectType: z.ZodEnum<{
6
+ point: "point";
7
+ segment: "segment";
8
+ line: "line";
9
+ circle: "circle";
10
+ }>;
11
+ referenceObjectId: z.ZodString;
12
+ throughPointId: z.ZodString;
13
+ toleranceDegrees: z.ZodNumber;
14
+ }, z.core.$strict>;
15
+ export type PerpendicularGoal = z.infer<typeof perpendicularGoalSchema>;
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const perpendicularGoalSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"perpendicular">;
5
+ objectType: z.ZodEnum<{
6
+ point: "point";
7
+ segment: "segment";
8
+ line: "line";
9
+ circle: "circle";
10
+ }>;
11
+ referenceObjectId: z.ZodString;
12
+ throughPointId: z.ZodString;
13
+ toleranceDegrees: z.ZodNumber;
14
+ }, z.core.$strict>;
15
+ export type PerpendicularGoal = z.infer<typeof perpendicularGoalSchema>;
16
+ //# sourceMappingURL=perpendicularGoal.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"perpendicularGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/perpendicularGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;kBASzB,CAAA;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const segmentLengthGoalSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"segmentLength">;
5
+ objectType: z.ZodLiteral<"segment">;
6
+ targetLength: z.ZodNumber;
7
+ toleranceUnits: z.ZodNumber;
8
+ }, z.core.$strict>;
9
+ export type SegmentLengthGoal = z.infer<typeof segmentLengthGoalSchema>;
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const segmentLengthGoalSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"segmentLength">;
5
+ objectType: z.ZodLiteral<"segment">;
6
+ targetLength: z.ZodNumber;
7
+ toleranceUnits: z.ZodNumber;
8
+ }, z.core.$strict>;
9
+ export type SegmentLengthGoal = z.infer<typeof segmentLengthGoalSchema>;
10
+ //# sourceMappingURL=segmentLengthGoal.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmentLengthGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/segmentLengthGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,uBAAuB;;;;;;kBAWzB,CAAA;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const throughPointsGoalSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"throughPoints">;
5
+ objectType: z.ZodEnum<{
6
+ point: "point";
7
+ segment: "segment";
8
+ line: "line";
9
+ circle: "circle";
10
+ }>;
11
+ pointIds: z.ZodArray<z.ZodString>;
12
+ }, z.core.$strict>;
13
+ export type ThroughPointsGoal = z.infer<typeof throughPointsGoalSchema>;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const throughPointsGoalSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"throughPoints">;
5
+ objectType: z.ZodEnum<{
6
+ point: "point";
7
+ segment: "segment";
8
+ line: "line";
9
+ circle: "circle";
10
+ }>;
11
+ pointIds: z.ZodArray<z.ZodString>;
12
+ }, z.core.$strict>;
13
+ export type ThroughPointsGoal = z.infer<typeof throughPointsGoalSchema>;
14
+ //# sourceMappingURL=throughPointsGoal.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"throughPointsGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/throughPointsGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,uBAAuB;;;;;;;;;;kBAOzB,CAAA;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { z } from 'zod';
2
+ export declare const geometryIdSchema: z.ZodString;
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const geometryIdSchema: z.ZodString;
3
+ //# sourceMappingURL=identifier.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifier.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/identifier.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,gBAAgB,aAKzB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const lineSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"line">;
5
+ through: z.ZodTuple<[z.ZodString, z.ZodString], null>;
6
+ }, z.core.$strict>;
7
+ export type Line = z.infer<typeof lineSchema>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const lineSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"line">;
5
+ through: z.ZodTuple<[z.ZodString, z.ZodString], null>;
6
+ }, z.core.$strict>;
7
+ export type Line = z.infer<typeof lineSchema>;
8
+ //# sourceMappingURL=line.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/line.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,UAAU;;;;kBAMZ,CAAA;AAEX,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ export interface MigrationStep {
2
+ from: number;
3
+ to: number;
4
+ migrate: (document: Record<string, unknown>) => Record<string, unknown>;
5
+ }
6
+ export type MigrationOutcome = {
7
+ success: true;
8
+ data: unknown;
9
+ } | {
10
+ success: false;
11
+ message: string;
12
+ };
13
+ /**
14
+ * Brings a stored document up to `latestVersion` by applying steps in order.
15
+ *
16
+ * Failure is a message, never a throw: the input is untrusted JSON from a
17
+ * database or a request body, and the caller wants to report it rather than
18
+ * crash. A document from a *newer* version fails too — downgrading by guessing
19
+ * which fields to drop would silently destroy student work.
20
+ */
21
+ export declare function applyMigrations(input: unknown, steps: readonly MigrationStep[], latestVersion: number): MigrationOutcome;
@@ -0,0 +1,22 @@
1
+ export interface MigrationStep {
2
+ from: number;
3
+ to: number;
4
+ migrate: (document: Record<string, unknown>) => Record<string, unknown>;
5
+ }
6
+ export type MigrationOutcome = {
7
+ success: true;
8
+ data: unknown;
9
+ } | {
10
+ success: false;
11
+ message: string;
12
+ };
13
+ /**
14
+ * Brings a stored document up to `latestVersion` by applying steps in order.
15
+ *
16
+ * Failure is a message, never a throw: the input is untrusted JSON from a
17
+ * database or a request body, and the caller wants to report it rather than
18
+ * crash. A document from a *newer* version fails too — downgrading by guessing
19
+ * which fields to drop would silently destroy student work.
20
+ */
21
+ export declare function applyMigrations(input: unknown, steps: readonly MigrationStep[], latestVersion: number): MigrationOutcome;
22
+ //# sourceMappingURL=migrate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/schemas/migrate.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACxE;AAED,MAAM,MAAM,gBAAgB,GAC1B;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAOxE;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,SAAS,aAAa,EAAE,EAC/B,aAAa,EAAE,MAAM,GACpB,gBAAgB,CAgDlB"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const objectTypeNameSchema: z.ZodEnum<{
3
+ point: "point";
4
+ segment: "segment";
5
+ line: "line";
6
+ circle: "circle";
7
+ }>;
8
+ export type ObjectTypeName = z.infer<typeof objectTypeNameSchema>;
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const objectTypeNameSchema: z.ZodEnum<{
3
+ point: "point";
4
+ segment: "segment";
5
+ line: "line";
6
+ circle: "circle";
7
+ }>;
8
+ export type ObjectTypeName = z.infer<typeof objectTypeNameSchema>;
9
+ //# sourceMappingURL=objectTypeName.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectTypeName.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/objectTypeName.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,oBAAoB;;;;;EAAiD,CAAA;AAElF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ export declare const pointSchema: z.ZodObject<{
3
+ x: z.ZodNumber;
4
+ y: z.ZodNumber;
5
+ }, z.core.$strict>;
6
+ export type Point = z.infer<typeof pointSchema>;
7
+ export declare const givenPointSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ type: z.ZodLiteral<"point">;
10
+ x: z.ZodNumber;
11
+ y: z.ZodNumber;
12
+ label: z.ZodOptional<z.ZodString>;
13
+ draggable: z.ZodOptional<z.ZodBoolean>;
14
+ }, z.core.$strict>;
15
+ export type GivenPoint = z.infer<typeof givenPointSchema>;
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const pointSchema: z.ZodObject<{
3
+ x: z.ZodNumber;
4
+ y: z.ZodNumber;
5
+ }, z.core.$strict>;
6
+ export type Point = z.infer<typeof pointSchema>;
7
+ export declare const givenPointSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ type: z.ZodLiteral<"point">;
10
+ x: z.ZodNumber;
11
+ y: z.ZodNumber;
12
+ label: z.ZodOptional<z.ZodString>;
13
+ draggable: z.ZodOptional<z.ZodBoolean>;
14
+ }, z.core.$strict>;
15
+ export type GivenPoint = z.infer<typeof givenPointSchema>;
16
+ //# sourceMappingURL=point.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"point.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/point.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,WAAW;;;kBAKb,CAAA;AAEX,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAE/C,eAAO,MAAM,gBAAgB;;;;;;;kBASlB,CAAA;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ export declare const freePointOriginSchema: z.ZodObject<{
3
+ x: z.ZodNumber;
4
+ y: z.ZodNumber;
5
+ }, z.core.$strict>;
6
+ export declare const onObjectPointOriginSchema: z.ZodObject<{
7
+ onObject: z.ZodString;
8
+ t: z.ZodNumber;
9
+ }, z.core.$strict>;
10
+ export declare const intersectionPointOriginSchema: z.ZodObject<{
11
+ intersectionOf: z.ZodTuple<[z.ZodString, z.ZodString], null>;
12
+ }, z.core.$strict>;
13
+ export declare const pointOriginSchema: z.ZodUnion<readonly [z.ZodObject<{
14
+ x: z.ZodNumber;
15
+ y: z.ZodNumber;
16
+ }, z.core.$strict>, z.ZodObject<{
17
+ onObject: z.ZodString;
18
+ t: z.ZodNumber;
19
+ }, z.core.$strict>, z.ZodObject<{
20
+ intersectionOf: z.ZodTuple<[z.ZodString, z.ZodString], null>;
21
+ }, z.core.$strict>]>;
22
+ export type FreePointOrigin = z.infer<typeof freePointOriginSchema>;
23
+ export type OnObjectPointOrigin = z.infer<typeof onObjectPointOriginSchema>;
24
+ export type IntersectionPointOrigin = z.infer<typeof intersectionPointOriginSchema>;
25
+ export type PointOrigin = z.infer<typeof pointOriginSchema>;
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ export declare const freePointOriginSchema: z.ZodObject<{
3
+ x: z.ZodNumber;
4
+ y: z.ZodNumber;
5
+ }, z.core.$strict>;
6
+ export declare const onObjectPointOriginSchema: z.ZodObject<{
7
+ onObject: z.ZodString;
8
+ t: z.ZodNumber;
9
+ }, z.core.$strict>;
10
+ export declare const intersectionPointOriginSchema: z.ZodObject<{
11
+ intersectionOf: z.ZodTuple<[z.ZodString, z.ZodString], null>;
12
+ }, z.core.$strict>;
13
+ export declare const pointOriginSchema: z.ZodUnion<readonly [z.ZodObject<{
14
+ x: z.ZodNumber;
15
+ y: z.ZodNumber;
16
+ }, z.core.$strict>, z.ZodObject<{
17
+ onObject: z.ZodString;
18
+ t: z.ZodNumber;
19
+ }, z.core.$strict>, z.ZodObject<{
20
+ intersectionOf: z.ZodTuple<[z.ZodString, z.ZodString], null>;
21
+ }, z.core.$strict>]>;
22
+ export type FreePointOrigin = z.infer<typeof freePointOriginSchema>;
23
+ export type OnObjectPointOrigin = z.infer<typeof onObjectPointOriginSchema>;
24
+ export type IntersectionPointOrigin = z.infer<typeof intersectionPointOriginSchema>;
25
+ export type PointOrigin = z.infer<typeof pointOriginSchema>;
26
+ //# sourceMappingURL=pointOrigin.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointOrigin.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/pointOrigin.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,qBAAqB;;;kBAKvB,CAAA;AAIX,eAAO,MAAM,yBAAyB;;;kBAK3B,CAAA;AAEX,eAAO,MAAM,6BAA6B;;kBAI/B,CAAA;AAIX,eAAO,MAAM,iBAAiB;;;;;;;;oBAI5B,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACnE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAC3E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACnF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const segmentSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"segment">;
5
+ from: z.ZodString;
6
+ to: z.ZodString;
7
+ }, z.core.$strict>;
8
+ export type Segment = z.infer<typeof segmentSchema>;
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const segmentSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"segment">;
5
+ from: z.ZodString;
6
+ to: z.ZodString;
7
+ }, z.core.$strict>;
8
+ export type Segment = z.infer<typeof segmentSchema>;
9
+ //# sourceMappingURL=segment.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segment.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/segment.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,aAAa;;;;;kBAOf,CAAA;AAEX,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { MigrationStep } from './migrate.cjs';
2
+ /** The version both steps below produce. */
3
+ export declare const v2SchemaVersion = 2;
4
+ /**
5
+ * A stored v1 attempt as a v2 one: `points` and `constructions` become the
6
+ * single `entities` record, `constructedPointIds` becomes `answerEntityIds`
7
+ * **plus every construction id**, and every entity gets an explicit
8
+ * presentation entry.
9
+ *
10
+ * The presentation row is the only line here that is not a rename. A v1 attempt
11
+ * has no concept of an implicit entity — everything in it came from a student
12
+ * gesture and is drawn — so `presentation: {}` plus the attempt's `implicit`
13
+ * default would hide every construction a student ever made (ADR 0008).
14
+ *
15
+ * `answerEntityIds` gaining the construction ids reproduces v1 grading exactly:
16
+ * v1 keeps a candidacy list for points only and treats every construction as a
17
+ * candidate.
18
+ */
19
+ export declare const geometryStateV1ToV2: MigrationStep;
20
+ /**
21
+ * A stored v1 exercise as a v2 one: `givens[]` becomes the same `entities`
22
+ * record the attempt uses, `label` moves into `presentation` and `draggable`
23
+ * becomes the `draggableEntityIds` list.
24
+ *
25
+ * `id`, `viewport`, `showGrid`, `allowedObjects`, `tools` and `goals` are
26
+ * carried over untouched — the goals array migrates by identity — and anything
27
+ * else a stored document carries is carried over too, so that the strict v2
28
+ * schema rejects an unknown field rather than this step silently eating it.
29
+ *
30
+ * An unlabelled given gets **no** presentation entry: the exercise's default
31
+ * role is `explicit`, so `{ role: 'explicit' }` and no entry mean the same
32
+ * thing, and the smaller document is the one that stays true if a given is
33
+ * later relabelled.
34
+ *
35
+ * A duplicate id is refused rather than collapsed — see `claimId()`.
36
+ */
37
+ export declare const geometryExerciseV1ToV2: MigrationStep;
@@ -0,0 +1,38 @@
1
+ import { MigrationStep } from './migrate.js';
2
+ /** The version both steps below produce. */
3
+ export declare const v2SchemaVersion = 2;
4
+ /**
5
+ * A stored v1 attempt as a v2 one: `points` and `constructions` become the
6
+ * single `entities` record, `constructedPointIds` becomes `answerEntityIds`
7
+ * **plus every construction id**, and every entity gets an explicit
8
+ * presentation entry.
9
+ *
10
+ * The presentation row is the only line here that is not a rename. A v1 attempt
11
+ * has no concept of an implicit entity — everything in it came from a student
12
+ * gesture and is drawn — so `presentation: {}` plus the attempt's `implicit`
13
+ * default would hide every construction a student ever made (ADR 0008).
14
+ *
15
+ * `answerEntityIds` gaining the construction ids reproduces v1 grading exactly:
16
+ * v1 keeps a candidacy list for points only and treats every construction as a
17
+ * candidate.
18
+ */
19
+ export declare const geometryStateV1ToV2: MigrationStep;
20
+ /**
21
+ * A stored v1 exercise as a v2 one: `givens[]` becomes the same `entities`
22
+ * record the attempt uses, `label` moves into `presentation` and `draggable`
23
+ * becomes the `draggableEntityIds` list.
24
+ *
25
+ * `id`, `viewport`, `showGrid`, `allowedObjects`, `tools` and `goals` are
26
+ * carried over untouched — the goals array migrates by identity — and anything
27
+ * else a stored document carries is carried over too, so that the strict v2
28
+ * schema rejects an unknown field rather than this step silently eating it.
29
+ *
30
+ * An unlabelled given gets **no** presentation entry: the exercise's default
31
+ * role is `explicit`, so `{ role: 'explicit' }` and no entry mean the same
32
+ * thing, and the smaller document is the one that stays true if a given is
33
+ * later relabelled.
34
+ *
35
+ * A duplicate id is refused rather than collapsed — see `claimId()`.
36
+ */
37
+ export declare const geometryExerciseV1ToV2: MigrationStep;
38
+ //# sourceMappingURL=v1ToV2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v1ToV2.d.ts","sourceRoot":"","sources":["../../src/schemas/v1ToV2.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAY9C,4CAA4C;AAC5C,eAAO,MAAM,eAAe,IAAI,CAAA;AA8EhC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAsCjC,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,EAAE,aA8CpC,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { ZodType } from 'zod';
2
+ import { MigrationStep } from './migrate.cjs';
3
+ /** The version the step below produces. */
4
+ export declare const v3SchemaVersion = 3;
5
+ /**
6
+ * Just enough of a schema for the gate: the next version's parser, passed in
7
+ * rather than imported to keep this module free of a cycle with
8
+ * `exercise.schema.ts` — and small enough that a test can substitute a laxer
9
+ * one and watch the gate react.
10
+ */
11
+ export interface DocumentGate {
12
+ safeParse(input: unknown): {
13
+ success: boolean;
14
+ };
15
+ }
16
+ /**
17
+ * An exercise hop that adds vocabulary and changes nothing it already had. The
18
+ * refusal rule, stated exactly: **a document that is invalid at `from` and
19
+ * valid at `from + 1` is refused.** That is what silent promotion means, and it
20
+ * covers every way the next version can be wider — a new field, a new entity
21
+ * kind, a new goal type, a new `allowedObjects` member, a new presentation
22
+ * entry, a loosened value — without the step having to enumerate them or read
23
+ * issue codes to guess which is which.
24
+ *
25
+ * A document that is invalid at **both** versions passes through untouched, so
26
+ * an ordinary fault (a bad viewport, a dangling parent) is still reported by
27
+ * `geometryExerciseSchema` at its own document path rather than refiled here as
28
+ * one message under `schemaVersion`. It is rejected either way; only the quality
29
+ * of the error differs, and the path is the better answer.
30
+ *
31
+ * `frozenSchema` must be a transcription of version `from` and `nextSchema` the
32
+ * parser of version `from + 1` — frozen as well unless that is the current one,
33
+ * because a current schema's version literal would never accept the promotion.
34
+ */
35
+ export declare function createIdentityExerciseStep(from: number, frozenSchema: ZodType, nextSchema: DocumentGate): MigrationStep;
36
+ /** The v2 → v3 hop, gated against the version 3 schema it is given. */
37
+ export declare function createGeometryExerciseV2ToV3(v3ExerciseSchema: DocumentGate): MigrationStep;
@@ -0,0 +1,38 @@
1
+ import { ZodType } from 'zod';
2
+ import { MigrationStep } from './migrate.js';
3
+ /** The version the step below produces. */
4
+ export declare const v3SchemaVersion = 3;
5
+ /**
6
+ * Just enough of a schema for the gate: the next version's parser, passed in
7
+ * rather than imported to keep this module free of a cycle with
8
+ * `exercise.schema.ts` — and small enough that a test can substitute a laxer
9
+ * one and watch the gate react.
10
+ */
11
+ export interface DocumentGate {
12
+ safeParse(input: unknown): {
13
+ success: boolean;
14
+ };
15
+ }
16
+ /**
17
+ * An exercise hop that adds vocabulary and changes nothing it already had. The
18
+ * refusal rule, stated exactly: **a document that is invalid at `from` and
19
+ * valid at `from + 1` is refused.** That is what silent promotion means, and it
20
+ * covers every way the next version can be wider — a new field, a new entity
21
+ * kind, a new goal type, a new `allowedObjects` member, a new presentation
22
+ * entry, a loosened value — without the step having to enumerate them or read
23
+ * issue codes to guess which is which.
24
+ *
25
+ * A document that is invalid at **both** versions passes through untouched, so
26
+ * an ordinary fault (a bad viewport, a dangling parent) is still reported by
27
+ * `geometryExerciseSchema` at its own document path rather than refiled here as
28
+ * one message under `schemaVersion`. It is rejected either way; only the quality
29
+ * of the error differs, and the path is the better answer.
30
+ *
31
+ * `frozenSchema` must be a transcription of version `from` and `nextSchema` the
32
+ * parser of version `from + 1` — frozen as well unless that is the current one,
33
+ * because a current schema's version literal would never accept the promotion.
34
+ */
35
+ export declare function createIdentityExerciseStep(from: number, frozenSchema: ZodType, nextSchema: DocumentGate): MigrationStep;
36
+ /** The v2 → v3 hop, gated against the version 3 schema it is given. */
37
+ export declare function createGeometryExerciseV2ToV3(v3ExerciseSchema: DocumentGate): MigrationStep;
38
+ //# sourceMappingURL=v2ToV3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2ToV3.d.ts","sourceRoot":"","sources":["../../src/schemas/v2ToV3.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAG9C,2CAA2C;AAC3C,eAAO,MAAM,eAAe,IAAI,CAAA;AAEhC;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAA;CAChD;AAkBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,OAAO,EACrB,UAAU,EAAE,YAAY,GACvB,aAAa,CAkBf;AAED,uEAAuE;AACvE,wBAAgB,4BAA4B,CAAC,gBAAgB,EAAE,YAAY,GAAG,aAAa,CAE1F"}
@@ -0,0 +1,3 @@
1
+ import { MigrationStep } from './migrate.cjs';
2
+ import { DocumentGate } from './v2ToV3.cjs';
3
+ export declare function createGeometryExerciseV3ToV4(currentExerciseSchema: DocumentGate): MigrationStep;
@@ -0,0 +1,4 @@
1
+ import { MigrationStep } from './migrate.js';
2
+ import { DocumentGate } from './v2ToV3.js';
3
+ export declare function createGeometryExerciseV3ToV4(currentExerciseSchema: DocumentGate): MigrationStep;
4
+ //# sourceMappingURL=v3ToV4.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v3ToV4.d.ts","sourceRoot":"","sources":["../../src/schemas/v3ToV4.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAE9C,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAExE,wBAAgB,4BAA4B,CAAC,qBAAqB,EAAE,YAAY,GAAG,aAAa,CAE/F"}
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const mathViewportSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3
+ export type MathViewport = z.infer<typeof mathViewportSchema>;
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const mathViewportSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
3
+ export type MathViewport = z.infer<typeof mathViewportSchema>;
4
+ //# sourceMappingURL=viewport.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewport.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/viewport.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,kBAAkB,wEAe3B,CAAA;AAEJ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./geometryState.schema-DKQ-durx.cjs"),t=require("./exercise.schema-BV2b7rtN.cjs");exports.applyMigrations=e.o,exports.createGoalSchema=e.y,exports.exerciseGradingSchema=t.t,exports.extraObjectPolicySchema=t.n,exports.geometryExerciseMigrations=t.r,exports.geometryExerciseSchema=t.i,exports.geometryGoalSchema=t.l,exports.geometryIdSchema=e.D,exports.geometryStateMigrations=e.t,exports.geometryStateSchema=e.n,exports.latestGeometryExerciseVersion=t.a,exports.latestGeometryStateVersion=e.r,exports.mathViewportSchema=t.u,exports.midpointGoalSchema=e.v,exports.migrateGeometryExercise=t.o,exports.migrateGeometryState=e.i,exports.objectTypeNameSchema=e.b,exports.parallelGoalSchema=e._,exports.parseGeometryExercise=t.s,exports.perpendicularGoalSchema=e.g,exports.pointSchema=e.l,exports.segmentLengthGoalSchema=e.h,exports.throughPointsGoalSchema=e.m,exports.toolNameSchema=t.c;
@@ -0,0 +1,3 @@
1
+ import { D as e, _ as t, b as n, g as r, h as i, i as a, l as o, m as s, n as c, o as l, r as u, t as d, v as f, y as p } from "./geometryState.schema-D0ixyGYE.js";
2
+ import { a as m, c as h, i as g, l as _, n as v, o as y, r as b, s as x, t as S, u as C } from "./exercise.schema-ckVBW9XA.js";
3
+ export { l as applyMigrations, p as createGoalSchema, S as exerciseGradingSchema, v as extraObjectPolicySchema, b as geometryExerciseMigrations, g as geometryExerciseSchema, _ as geometryGoalSchema, e as geometryIdSchema, d as geometryStateMigrations, c as geometryStateSchema, m as latestGeometryExerciseVersion, u as latestGeometryStateVersion, C as mathViewportSchema, f as midpointGoalSchema, y as migrateGeometryExercise, a as migrateGeometryState, n as objectTypeNameSchema, t as parallelGoalSchema, x as parseGeometryExercise, r as perpendicularGoalSchema, o as pointSchema, i as segmentLengthGoalSchema, s as throughPointsGoalSchema, h as toolNameSchema };
@@ -0,0 +1,30 @@
1
+ import { SceneEntity } from '../geometry/hitTest.cjs';
2
+ import { Point, PointId } from '../geometry/point.cjs';
3
+ import { EntityId, PointDefinition } from '../geometry/entityModel.cjs';
4
+ import { MathViewport } from '../schemas/viewport.schema.cjs';
5
+ export type SnapKind = 'point' | 'intersection' | 'grid' | 'onObject';
6
+ export interface SnapResult {
7
+ position: Point;
8
+ kind: SnapKind;
9
+ targetIds: string[];
10
+ parameter?: number;
11
+ distance: number;
12
+ }
13
+ export interface SnapScene {
14
+ points: ReadonlyMap<PointId, Point>;
15
+ objects: readonly SceneEntity[];
16
+ viewport: MathViewport;
17
+ showGrid?: boolean;
18
+ isSnapTarget?: (id: EntityId) => boolean;
19
+ }
20
+ export interface SnapOptions {
21
+ tolerance: number;
22
+ exclude?: readonly string[];
23
+ kinds?: readonly SnapKind[];
24
+ }
25
+ export declare function computeSnap(at: Point, scene: SnapScene, options: SnapOptions): SnapResult | null;
26
+ export declare function snapPosition(at: Point, scene: SnapScene, options: SnapOptions): Point;
27
+ export declare function originForSnap(placement: {
28
+ position: Point;
29
+ snap: SnapResult | null;
30
+ }): PointDefinition | null;