@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,139 @@
1
+ import { Point } from './point.cjs';
2
+ import { MeasuredObject } from '../measure/geometryAdapter.cjs';
3
+ export type EntityId = string;
4
+ export type EntityKind = 'point' | 'segment' | 'line' | 'circle';
5
+ export interface FreeOrigin {
6
+ at: Point;
7
+ }
8
+ export interface OnEntityOrigin {
9
+ on: EntityId;
10
+ t: number;
11
+ }
12
+ export interface IntersectionOrigin {
13
+ intersectionOf: readonly [EntityId, EntityId];
14
+ which?: 0 | 1;
15
+ }
16
+ export type ConstructionOrigin = FreeOrigin | OnEntityOrigin | IntersectionOrigin;
17
+ export type FreePointDefinition = {
18
+ kind: 'point';
19
+ } & FreeOrigin;
20
+ export type OnEntityPointDefinition = {
21
+ kind: 'point';
22
+ } & OnEntityOrigin;
23
+ export type IntersectionPointDefinition = {
24
+ kind: 'point';
25
+ } & IntersectionOrigin;
26
+ export type PointDefinition = FreePointDefinition | OnEntityPointDefinition | IntersectionPointDefinition;
27
+ export interface SegmentDefinition {
28
+ kind: 'segment';
29
+ parents: readonly [EntityId, EntityId];
30
+ }
31
+ export interface LineDefinition {
32
+ kind: 'line';
33
+ parents: readonly [EntityId, EntityId];
34
+ }
35
+ export interface CircleDefinition {
36
+ kind: 'circle';
37
+ parents: readonly [EntityId, EntityId];
38
+ }
39
+ export type EntityDefinition = PointDefinition | SegmentDefinition | LineDefinition | CircleDefinition;
40
+ export type EntityDefinitionOf<K extends EntityKind> = Extract<EntityDefinition, {
41
+ kind: K;
42
+ }>;
43
+ export interface ResolvedPoint {
44
+ kind: 'point';
45
+ at: Point;
46
+ }
47
+ export interface ResolvedSegment {
48
+ kind: 'segment';
49
+ from: Point;
50
+ to: Point;
51
+ }
52
+ export interface ResolvedLine {
53
+ kind: 'line';
54
+ through: readonly [Point, Point];
55
+ }
56
+ export interface ResolvedCircle {
57
+ kind: 'circle';
58
+ center: Point;
59
+ radius: number;
60
+ }
61
+ export type ResolvedEntity = ResolvedPoint | ResolvedSegment | ResolvedLine | ResolvedCircle;
62
+ export type ResolvedEntityOf<K extends EntityKind> = Extract<ResolvedEntity, {
63
+ kind: K;
64
+ }>;
65
+ export type ShapeDescriptor = {
66
+ shape: 'point';
67
+ at: Point;
68
+ } | {
69
+ shape: 'segment';
70
+ from: Point;
71
+ to: Point;
72
+ } | {
73
+ shape: 'line';
74
+ through: readonly [Point, Point];
75
+ } | {
76
+ shape: 'circle';
77
+ center: Point;
78
+ radius: number;
79
+ };
80
+ export type EntityRole = 'implicit' | 'explicit';
81
+ export interface EntityPresentation {
82
+ role: EntityRole;
83
+ label?: string;
84
+ }
85
+ export interface EntityCapabilities {
86
+ rendered: boolean;
87
+ selectable: boolean;
88
+ snapTarget: boolean;
89
+ }
90
+ export interface EvaluationIssueLocation {
91
+ path?: string;
92
+ }
93
+ export type EvaluationIssue = EvaluationIssueLocation & ({
94
+ entityId: EntityId;
95
+ reason: 'cycle';
96
+ cycle: readonly EntityId[];
97
+ } | {
98
+ entityId: EntityId;
99
+ reason: 'missing-parent';
100
+ parentId: EntityId;
101
+ } | {
102
+ entityId: EntityId;
103
+ reason: 'degenerate';
104
+ } | {
105
+ entityId: EntityId;
106
+ reason: 'out-of-domain';
107
+ } | {
108
+ entityId: EntityId;
109
+ reason: 'duplicate-id';
110
+ });
111
+ export interface Evaluation {
112
+ readonly resolved: ReadonlyMap<EntityId, ResolvedEntity>;
113
+ readonly issues: readonly EvaluationIssue[];
114
+ }
115
+ export interface EntityOperations<D extends EntityDefinition = EntityDefinition, R extends ResolvedEntity = ResolvedEntity> {
116
+ readonly kind: D['kind'];
117
+ parents(definition: D): readonly EntityId[];
118
+ resolve(definition: D, parents: readonly ResolvedEntity[]): R | null;
119
+ toShape(resolved: R): ShapeDescriptor;
120
+ toMeasured(resolved: R): MeasuredObject | null;
121
+ distanceTo(resolved: R, at: Point): number;
122
+ readonly hitPriority: number;
123
+ identityKey(definition: D): string;
124
+ describe(definition: D, nameOf: (id: EntityId) => string): string;
125
+ parameterAt?(resolved: R, at: Point): number;
126
+ }
127
+ export type EntityRegistry = {
128
+ readonly [K in EntityKind]: EntityOperations<EntityDefinitionOf<K>, ResolvedEntityOf<K>>;
129
+ };
130
+ export interface GeometryContext {
131
+ readonly entityIds: readonly EntityId[];
132
+ readonly issues: readonly EvaluationIssue[];
133
+ definitionOf(id: EntityId): EntityDefinition | undefined;
134
+ resolvedOf(id: EntityId): ResolvedEntity | undefined;
135
+ shapeOf(id: EntityId): ShapeDescriptor | undefined;
136
+ presentationOf(id: EntityId): EntityPresentation;
137
+ isGiven(id: EntityId): boolean;
138
+ dependentsOf(id: EntityId): readonly EntityId[];
139
+ }
@@ -0,0 +1,140 @@
1
+ import { Point } from './point.js';
2
+ import { MeasuredObject } from '../measure/geometryAdapter.js';
3
+ export type EntityId = string;
4
+ export type EntityKind = 'point' | 'segment' | 'line' | 'circle';
5
+ export interface FreeOrigin {
6
+ at: Point;
7
+ }
8
+ export interface OnEntityOrigin {
9
+ on: EntityId;
10
+ t: number;
11
+ }
12
+ export interface IntersectionOrigin {
13
+ intersectionOf: readonly [EntityId, EntityId];
14
+ which?: 0 | 1;
15
+ }
16
+ export type ConstructionOrigin = FreeOrigin | OnEntityOrigin | IntersectionOrigin;
17
+ export type FreePointDefinition = {
18
+ kind: 'point';
19
+ } & FreeOrigin;
20
+ export type OnEntityPointDefinition = {
21
+ kind: 'point';
22
+ } & OnEntityOrigin;
23
+ export type IntersectionPointDefinition = {
24
+ kind: 'point';
25
+ } & IntersectionOrigin;
26
+ export type PointDefinition = FreePointDefinition | OnEntityPointDefinition | IntersectionPointDefinition;
27
+ export interface SegmentDefinition {
28
+ kind: 'segment';
29
+ parents: readonly [EntityId, EntityId];
30
+ }
31
+ export interface LineDefinition {
32
+ kind: 'line';
33
+ parents: readonly [EntityId, EntityId];
34
+ }
35
+ export interface CircleDefinition {
36
+ kind: 'circle';
37
+ parents: readonly [EntityId, EntityId];
38
+ }
39
+ export type EntityDefinition = PointDefinition | SegmentDefinition | LineDefinition | CircleDefinition;
40
+ export type EntityDefinitionOf<K extends EntityKind> = Extract<EntityDefinition, {
41
+ kind: K;
42
+ }>;
43
+ export interface ResolvedPoint {
44
+ kind: 'point';
45
+ at: Point;
46
+ }
47
+ export interface ResolvedSegment {
48
+ kind: 'segment';
49
+ from: Point;
50
+ to: Point;
51
+ }
52
+ export interface ResolvedLine {
53
+ kind: 'line';
54
+ through: readonly [Point, Point];
55
+ }
56
+ export interface ResolvedCircle {
57
+ kind: 'circle';
58
+ center: Point;
59
+ radius: number;
60
+ }
61
+ export type ResolvedEntity = ResolvedPoint | ResolvedSegment | ResolvedLine | ResolvedCircle;
62
+ export type ResolvedEntityOf<K extends EntityKind> = Extract<ResolvedEntity, {
63
+ kind: K;
64
+ }>;
65
+ export type ShapeDescriptor = {
66
+ shape: 'point';
67
+ at: Point;
68
+ } | {
69
+ shape: 'segment';
70
+ from: Point;
71
+ to: Point;
72
+ } | {
73
+ shape: 'line';
74
+ through: readonly [Point, Point];
75
+ } | {
76
+ shape: 'circle';
77
+ center: Point;
78
+ radius: number;
79
+ };
80
+ export type EntityRole = 'implicit' | 'explicit';
81
+ export interface EntityPresentation {
82
+ role: EntityRole;
83
+ label?: string;
84
+ }
85
+ export interface EntityCapabilities {
86
+ rendered: boolean;
87
+ selectable: boolean;
88
+ snapTarget: boolean;
89
+ }
90
+ export interface EvaluationIssueLocation {
91
+ path?: string;
92
+ }
93
+ export type EvaluationIssue = EvaluationIssueLocation & ({
94
+ entityId: EntityId;
95
+ reason: 'cycle';
96
+ cycle: readonly EntityId[];
97
+ } | {
98
+ entityId: EntityId;
99
+ reason: 'missing-parent';
100
+ parentId: EntityId;
101
+ } | {
102
+ entityId: EntityId;
103
+ reason: 'degenerate';
104
+ } | {
105
+ entityId: EntityId;
106
+ reason: 'out-of-domain';
107
+ } | {
108
+ entityId: EntityId;
109
+ reason: 'duplicate-id';
110
+ });
111
+ export interface Evaluation {
112
+ readonly resolved: ReadonlyMap<EntityId, ResolvedEntity>;
113
+ readonly issues: readonly EvaluationIssue[];
114
+ }
115
+ export interface EntityOperations<D extends EntityDefinition = EntityDefinition, R extends ResolvedEntity = ResolvedEntity> {
116
+ readonly kind: D['kind'];
117
+ parents(definition: D): readonly EntityId[];
118
+ resolve(definition: D, parents: readonly ResolvedEntity[]): R | null;
119
+ toShape(resolved: R): ShapeDescriptor;
120
+ toMeasured(resolved: R): MeasuredObject | null;
121
+ distanceTo(resolved: R, at: Point): number;
122
+ readonly hitPriority: number;
123
+ identityKey(definition: D): string;
124
+ describe(definition: D, nameOf: (id: EntityId) => string): string;
125
+ parameterAt?(resolved: R, at: Point): number;
126
+ }
127
+ export type EntityRegistry = {
128
+ readonly [K in EntityKind]: EntityOperations<EntityDefinitionOf<K>, ResolvedEntityOf<K>>;
129
+ };
130
+ export interface GeometryContext {
131
+ readonly entityIds: readonly EntityId[];
132
+ readonly issues: readonly EvaluationIssue[];
133
+ definitionOf(id: EntityId): EntityDefinition | undefined;
134
+ resolvedOf(id: EntityId): ResolvedEntity | undefined;
135
+ shapeOf(id: EntityId): ShapeDescriptor | undefined;
136
+ presentationOf(id: EntityId): EntityPresentation;
137
+ isGiven(id: EntityId): boolean;
138
+ dependentsOf(id: EntityId): readonly EntityId[];
139
+ }
140
+ //# sourceMappingURL=entityModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entityModel.d.ts","sourceRoot":"","sources":["../../src/geometry/entityModel.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,MAAM,MAAM,QAAQ,GAAG,M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GAAG,OAAO,CAAA;IAK9B,YAAY,CAAC,EAAE,EAAE,QAAQ,GAAG,SAAS,QAAQ,EAAE,CAAA;CAChD"}
@@ -0,0 +1,27 @@
1
+ import { EntityId } from './entityModel.cjs';
2
+ /**
3
+ * The one id a record cannot carry, and therefore the one the parse boundary
4
+ * and the migration steps refuse.
5
+ */
6
+ export declare const unstorableEntityId = "__proto__";
7
+ export declare function isUnstorableEntityId(id: string): boolean;
8
+ /** The message every refusal of it uses, so the two boundaries agree. */
9
+ export declare function unstorableEntityIdMessage(id: string): string;
10
+ /**
11
+ * A record entry, read as a declaration rather than as a property.
12
+ *
13
+ * The `undefined` this returns for an undeclared id is what the callers already
14
+ * expect under `noUncheckedIndexedAccess`; the difference is that they now get
15
+ * it for `constructor` too.
16
+ */
17
+ export declare function entryOf<T>(record: Record<EntityId, T>, id: EntityId): T | undefined;
18
+ /**
19
+ * An accumulator for a record being built from untrusted input.
20
+ *
21
+ * Null-prototype, so nothing inherited can be mistaken for an entry while the
22
+ * record is being filled and so `__proto__` would be stored rather than
23
+ * swallowed — the migration steps refuse that key outright, and this is what
24
+ * makes the refusal a decision instead of a description of what the literal
25
+ * would have done anyway.
26
+ */
27
+ export declare function emptyEntityRecord<T>(): Record<EntityId, T>;
@@ -0,0 +1,28 @@
1
+ import { EntityId } from './entityModel.js';
2
+ /**
3
+ * The one id a record cannot carry, and therefore the one the parse boundary
4
+ * and the migration steps refuse.
5
+ */
6
+ export declare const unstorableEntityId = "__proto__";
7
+ export declare function isUnstorableEntityId(id: string): boolean;
8
+ /** The message every refusal of it uses, so the two boundaries agree. */
9
+ export declare function unstorableEntityIdMessage(id: string): string;
10
+ /**
11
+ * A record entry, read as a declaration rather than as a property.
12
+ *
13
+ * The `undefined` this returns for an undeclared id is what the callers already
14
+ * expect under `noUncheckedIndexedAccess`; the difference is that they now get
15
+ * it for `constructor` too.
16
+ */
17
+ export declare function entryOf<T>(record: Record<EntityId, T>, id: EntityId): T | undefined;
18
+ /**
19
+ * An accumulator for a record being built from untrusted input.
20
+ *
21
+ * Null-prototype, so nothing inherited can be mistaken for an entry while the
22
+ * record is being filled and so `__proto__` would be stored rather than
23
+ * swallowed — the migration steps refuse that key outright, and this is what
24
+ * makes the refusal a decision instead of a description of what the literal
25
+ * would have done anyway.
26
+ */
27
+ export declare function emptyEntityRecord<T>(): Record<EntityId, T>;
28
+ //# sourceMappingURL=entityRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entityRecord.d.ts","sourceRoot":"","sources":["../../src/geometry/entityRecord.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,cAAc,CAAA;AAE7C,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,yEAAyE;AACzE,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,GAAG,CAAC,GAAG,SAAS,CAEnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,KAAK,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAE1D"}
@@ -0,0 +1,37 @@
1
+ import { EntityDefinition, EntityId, Evaluation, EvaluationIssue, ResolvedEntity } from './entityModel.cjs';
2
+ /**
3
+ * Where definitions come from. A `GeometryContext` implements this over two v1
4
+ * documents; a test implements it over a `Map`.
5
+ *
6
+ * `definitionOf` returning `undefined` is what "nothing declares that id" means,
7
+ * and it is the only thing the walk treats as a missing parent — a parent that
8
+ * exists but cannot be used is a degenerate construction, not a missing one.
9
+ */
10
+ export interface GraphSource {
11
+ definitionOf(id: EntityId): EntityDefinition | undefined;
12
+ pathOf?(id: EntityId): string | undefined;
13
+ }
14
+ /**
15
+ * A memoized walk over one source. Resolution is lazy — a caller drives it by
16
+ * asking — and every answer is cached, including a failure, so evaluation is
17
+ * linear in the graph's edges rather than exponential on a diamond.
18
+ *
19
+ * An evaluator is single-use and holds the results of its own walk. It is not a
20
+ * cache across scenes: the context builds one per snapshot, because a cache
21
+ * keyed on document identity would make every benchmark measure a cache hit.
22
+ */
23
+ export interface GraphEvaluator {
24
+ readonly resolve: (id: EntityId) => ResolvedEntity | null;
25
+ readonly resolved: ReadonlyMap<EntityId, ResolvedEntity>;
26
+ readonly issues: readonly EvaluationIssue[];
27
+ }
28
+ export declare function createGraphEvaluator(source: GraphSource): GraphEvaluator;
29
+ /**
30
+ * The whole graph at once — RFC 0001's `evaluate()`, and the entry point for a
31
+ * caller holding definitions rather than documents.
32
+ *
33
+ * Deterministic and free of any environment: the same map produces the same
34
+ * resolved scene and the same issues in a browser and in bare Node, because the
35
+ * only inputs are the definitions and the only order is the map's own.
36
+ */
37
+ export declare function evaluateGraph(definitions: ReadonlyMap<EntityId, EntityDefinition>): Evaluation;
@@ -0,0 +1,38 @@
1
+ import { EntityDefinition, EntityId, Evaluation, EvaluationIssue, ResolvedEntity } from './entityModel.js';
2
+ /**
3
+ * Where definitions come from. A `GeometryContext` implements this over two v1
4
+ * documents; a test implements it over a `Map`.
5
+ *
6
+ * `definitionOf` returning `undefined` is what "nothing declares that id" means,
7
+ * and it is the only thing the walk treats as a missing parent — a parent that
8
+ * exists but cannot be used is a degenerate construction, not a missing one.
9
+ */
10
+ export interface GraphSource {
11
+ definitionOf(id: EntityId): EntityDefinition | undefined;
12
+ pathOf?(id: EntityId): string | undefined;
13
+ }
14
+ /**
15
+ * A memoized walk over one source. Resolution is lazy — a caller drives it by
16
+ * asking — and every answer is cached, including a failure, so evaluation is
17
+ * linear in the graph's edges rather than exponential on a diamond.
18
+ *
19
+ * An evaluator is single-use and holds the results of its own walk. It is not a
20
+ * cache across scenes: the context builds one per snapshot, because a cache
21
+ * keyed on document identity would make every benchmark measure a cache hit.
22
+ */
23
+ export interface GraphEvaluator {
24
+ readonly resolve: (id: EntityId) => ResolvedEntity | null;
25
+ readonly resolved: ReadonlyMap<EntityId, ResolvedEntity>;
26
+ readonly issues: readonly EvaluationIssue[];
27
+ }
28
+ export declare function createGraphEvaluator(source: GraphSource): GraphEvaluator;
29
+ /**
30
+ * The whole graph at once — RFC 0001's `evaluate()`, and the entry point for a
31
+ * caller holding definitions rather than documents.
32
+ *
33
+ * Deterministic and free of any environment: the same map produces the same
34
+ * resolved scene and the same issues in a browser and in bare Node, because the
35
+ * only inputs are the definitions and the only order is the map's own.
36
+ */
37
+ export declare function evaluateGraph(definitions: ReadonlyMap<EntityId, EntityDefinition>): Evaluation;
38
+ //# sourceMappingURL=evaluateGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluateGraph.d.ts","sourceRoot":"","sources":["../../src/geometry/evaluateGraph.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,eAAe,EACf,cAAc,EACf,MAAM,eAAe,CAAA;AAKtB;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,EAAE,EAAE,QAAQ,GAAG,gBAAgB,GAAG,SAAS,CAAA;IAIxD,MAAM,CAAC,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAA;CAC1C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAG7B,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,cAAc,GAAG,IAAI,CAAA;IAIzD,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAA;IAGxD,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;CAC5C;AAoBD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,cAAc,CAuFxE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,QAAQ,EAAE,gBAAgB,CAAC,GAAG,UAAU,CAI9F"}
@@ -0,0 +1,4 @@
1
+ import { PointId } from './point.cjs';
2
+ import { GeometryObject } from '../schemas/geometryObject.schema.cjs';
3
+ export type { GeometryObject } from '../schemas/geometryObject.schema.cjs';
4
+ export declare function endpointsOf(object: GeometryObject): [PointId, PointId];
@@ -0,0 +1,5 @@
1
+ import { PointId } from './point.js';
2
+ import { GeometryObject } from '../schemas/geometryObject.schema.js';
3
+ export type { GeometryObject } from '../schemas/geometryObject.schema.js';
4
+ export declare function endpointsOf(object: GeometryObject): [PointId, PointId];
5
+ //# sourceMappingURL=geometryObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometryObject.d.ts","sourceRoot":"","sources":["../../src/geometry/geometryObject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAGtC,YAAY,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAgBtE,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAOtE"}
@@ -0,0 +1,8 @@
1
+ import { PointDefinition } from './entityModel.cjs';
2
+ import { SceneEntity } from './hitTest.cjs';
3
+ export type GoalCandidate = SceneEntity;
4
+ /** A candidate that is a point — the only narrowing a handler asks for. */
5
+ export type CandidatePoint = GoalCandidate & {
6
+ definition: PointDefinition;
7
+ };
8
+ export declare function isCandidatePoint(candidate: GoalCandidate): candidate is CandidatePoint;
@@ -0,0 +1,9 @@
1
+ import { PointDefinition } from './entityModel.js';
2
+ import { SceneEntity } from './hitTest.js';
3
+ export type GoalCandidate = SceneEntity;
4
+ /** A candidate that is a point — the only narrowing a handler asks for. */
5
+ export type CandidatePoint = GoalCandidate & {
6
+ definition: PointDefinition;
7
+ };
8
+ export declare function isCandidatePoint(candidate: GoalCandidate): candidate is CandidatePoint;
9
+ //# sourceMappingURL=goalCandidate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goalCandidate.d.ts","sourceRoot":"","sources":["../../src/geometry/goalCandidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAa5C,MAAM,MAAM,aAAa,GAAG,WAAW,CAAA;AAEvC,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAAE,UAAU,EAAE,eAAe,CAAA;CAAE,CAAA;AAE5E,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,aAAa,GAAG,SAAS,IAAI,cAAc,CAEtF"}
@@ -0,0 +1,23 @@
1
+ import { EntityDefinition, EntityId, EntityKind } from './entityModel.cjs';
2
+ import { Point, PointId } from './point.cjs';
3
+ export type HitTestType = EntityKind;
4
+ export interface HitTestResult {
5
+ id: string;
6
+ type: HitTestType;
7
+ distance: number;
8
+ }
9
+ export interface SceneEntity {
10
+ id: EntityId;
11
+ definition: EntityDefinition;
12
+ }
13
+ export interface HitTestGeometry {
14
+ points: ReadonlyMap<PointId, Point>;
15
+ objects: readonly SceneEntity[];
16
+ }
17
+ export interface HitTestOptions {
18
+ exclude?: readonly string[];
19
+ types?: readonly HitTestType[];
20
+ accepts?: (id: EntityId) => boolean;
21
+ }
22
+ export declare function hitTest(at: Point, geometry: HitTestGeometry, tolerance: number, options?: HitTestOptions): HitTestResult[];
23
+ export declare function firstHit(at: Point, geometry: HitTestGeometry, tolerance: number, options?: HitTestOptions): HitTestResult | null;
@@ -0,0 +1,24 @@
1
+ import { EntityDefinition, EntityId, EntityKind } from './entityModel.js';
2
+ import { Point, PointId } from './point.js';
3
+ export type HitTestType = EntityKind;
4
+ export interface HitTestResult {
5
+ id: string;
6
+ type: HitTestType;
7
+ distance: number;
8
+ }
9
+ export interface SceneEntity {
10
+ id: EntityId;
11
+ definition: EntityDefinition;
12
+ }
13
+ export interface HitTestGeometry {
14
+ points: ReadonlyMap<PointId, Point>;
15
+ objects: readonly SceneEntity[];
16
+ }
17
+ export interface HitTestOptions {
18
+ exclude?: readonly string[];
19
+ types?: readonly HitTestType[];
20
+ accepts?: (id: EntityId) => boolean;
21
+ }
22
+ export declare function hitTest(at: Point, geometry: HitTestGeometry, tolerance: number, options?: HitTestOptions): HitTestResult[];
23
+ export declare function firstHit(at: Point, geometry: HitTestGeometry, tolerance: number, options?: HitTestOptions): HitTestResult | null;
24
+ //# sourceMappingURL=hitTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hitTest.d.ts","sourceRoot":"","sources":["../../src/geometry/hitTest.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAM7C,MAAM,MAAM,WAAW,GAAG,UAAU,CAAA;AAEpC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAMD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,QAAQ,CAAA;IACZ,UAAU,EAAE,gBAAgB,CAAA;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IACnC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAA;CAChC;AAED,MAAM,WAAW,cAAc;IAG7B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAE3B,KAAK,CAAC,EAAE,SAAS,WAAW,EAAE,CAAA;IAK9B,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAA;CACpC;AAOD,wBAAgB,OAAO,CACrB,EAAE,EAAE,KAAK,EACT,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,cAAmB,GAC3B,aAAa,EAAE,CA+BjB;AAID,wBAAgB,QAAQ,CACtB,EAAE,EAAE,KAAK,EACT,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,cAAmB,GAC3B,aAAa,GAAG,IAAI,CAEtB"}
@@ -0,0 +1,5 @@
1
+ import { Point } from '../schemas/point.schema.cjs';
2
+ export type { Point, GivenPoint } from '../schemas/point.schema.cjs';
3
+ export type PointId = string;
4
+ export declare function distanceBetween(a: Point, b: Point): number;
5
+ export declare function midpointOf(a: Point, b: Point): Point;
@@ -0,0 +1,6 @@
1
+ import { Point } from '../schemas/point.schema.js';
2
+ export type { Point, GivenPoint } from '../schemas/point.schema.js';
3
+ export type PointId = string;
4
+ export declare function distanceBetween(a: Point, b: Point): number;
5
+ export declare function midpointOf(a: Point, b: Point): Point;
6
+ //# sourceMappingURL=point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../src/geometry/point.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAEpD,MAAM,MAAM,OAAO,GAAG,MAAM,CAAA;AAM5B,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAE1D;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAEpD"}
@@ -0,0 +1,5 @@
1
+ import { FreePointOrigin, IntersectionPointOrigin, OnObjectPointOrigin, PointOrigin } from '../schemas/pointOrigin.schema.cjs';
2
+ export type { PointOrigin, FreePointOrigin, OnObjectPointOrigin, IntersectionPointOrigin, } from '../schemas/pointOrigin.schema.cjs';
3
+ export declare function isFreeOrigin(origin: PointOrigin): origin is FreePointOrigin;
4
+ export declare function isOnObjectOrigin(origin: PointOrigin): origin is OnObjectPointOrigin;
5
+ export declare function isIntersectionOrigin(origin: PointOrigin): origin is IntersectionPointOrigin;
@@ -0,0 +1,6 @@
1
+ import { FreePointOrigin, IntersectionPointOrigin, OnObjectPointOrigin, PointOrigin } from '../schemas/pointOrigin.schema.js';
2
+ export type { PointOrigin, FreePointOrigin, OnObjectPointOrigin, IntersectionPointOrigin, } from '../schemas/pointOrigin.schema.js';
3
+ export declare function isFreeOrigin(origin: PointOrigin): origin is FreePointOrigin;
4
+ export declare function isOnObjectOrigin(origin: PointOrigin): origin is OnObjectPointOrigin;
5
+ export declare function isIntersectionOrigin(origin: PointOrigin): origin is IntersectionPointOrigin;
6
+ //# sourceMappingURL=pointOrigin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointOrigin.d.ts","sourceRoot":"","sources":["../../src/geometry/pointOrigin.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,WAAW,EACZ,MAAM,+BAA+B,CAAA;AAEtC,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,eAAe,CAE3E;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,mBAAmB,CAEnF;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,uBAAuB,CAE3F"}
@@ -0,0 +1,41 @@
1
+ import { EntityDefinition, PointDefinition, ResolvedEntity } from './entityModel.cjs';
2
+ import { GeometryObject } from '../schemas/geometryObject.schema.cjs';
3
+ import { GivenElement } from '../schemas/givenElement.schema.cjs';
4
+ import { Point, PointId } from './point.cjs';
5
+ import { PointOrigin } from './pointOrigin.cjs';
6
+ /** The definition a stored v1 construction or given object stands for. */
7
+ export declare function definitionOfObject(object: GeometryObject): EntityDefinition;
8
+ /** The definition a stored v1 point origin stands for. */
9
+ export declare function definitionOfOrigin(origin: PointOrigin): PointDefinition;
10
+ /**
11
+ * The definition a stored v1 given stands for, point or object.
12
+ *
13
+ * A given point's coordinates are its origin, exactly as a free attempt point's
14
+ * are — v1 spells them as two fields on the given rather than as a `PointOrigin`,
15
+ * which is the only reason this is not `definitionOfOrigin()`. The v1 → v2
16
+ * exercise migration and the goal authoring rules both need it.
17
+ */
18
+ export declare function definitionOfGiven(given: GivenElement): EntityDefinition;
19
+ /**
20
+ * Every point a stored v1 object is built on, in declaration order — the
21
+ * general reference API `endpointsOf()` used to be.
22
+ *
23
+ * A caller that only asks *which points does this name* wants this: it stays
24
+ * correct for a kind that names one parent or three, where a pair does not.
25
+ */
26
+ export declare function parentsOfObject(object: GeometryObject): readonly PointId[];
27
+ /**
28
+ * The key deciding whether two stored v1 objects are the same construction —
29
+ * `${type}:${sorted endpoints}` as both `superRefine` blocks built inline,
30
+ * except that the sort is now the kind's own decision (RFC 0001 § Q9).
31
+ */
32
+ export declare function identityKeyOfObject(object: GeometryObject): string;
33
+ /**
34
+ * The resolved form of a v1 object, evaluated against points that have already
35
+ * been resolved for the scene it belongs to — `null` when it is not on screen.
36
+ *
37
+ * For the consumers that still hold a v1 object and a point map instead of a
38
+ * context; a caller holding an `IndexedGeometryContext` asks that, because its
39
+ * answers are cached and these are computed per call.
40
+ */
41
+ export declare function resolvedOfObject(object: GeometryObject, points: ReadonlyMap<PointId, Point>): ResolvedEntity | null;
@@ -0,0 +1,42 @@
1
+ import { EntityDefinition, PointDefinition, ResolvedEntity } from './entityModel.js';
2
+ import { GeometryObject } from '../schemas/geometryObject.schema.js';
3
+ import { GivenElement } from '../schemas/givenElement.schema.js';
4
+ import { Point, PointId } from './point.js';
5
+ import { PointOrigin } from './pointOrigin.js';
6
+ /** The definition a stored v1 construction or given object stands for. */
7
+ export declare function definitionOfObject(object: GeometryObject): EntityDefinition;
8
+ /** The definition a stored v1 point origin stands for. */
9
+ export declare function definitionOfOrigin(origin: PointOrigin): PointDefinition;
10
+ /**
11
+ * The definition a stored v1 given stands for, point or object.
12
+ *
13
+ * A given point's coordinates are its origin, exactly as a free attempt point's
14
+ * are — v1 spells them as two fields on the given rather than as a `PointOrigin`,
15
+ * which is the only reason this is not `definitionOfOrigin()`. The v1 → v2
16
+ * exercise migration and the goal authoring rules both need it.
17
+ */
18
+ export declare function definitionOfGiven(given: GivenElement): EntityDefinition;
19
+ /**
20
+ * Every point a stored v1 object is built on, in declaration order — the
21
+ * general reference API `endpointsOf()` used to be.
22
+ *
23
+ * A caller that only asks *which points does this name* wants this: it stays
24
+ * correct for a kind that names one parent or three, where a pair does not.
25
+ */
26
+ export declare function parentsOfObject(object: GeometryObject): readonly PointId[];
27
+ /**
28
+ * The key deciding whether two stored v1 objects are the same construction —
29
+ * `${type}:${sorted endpoints}` as both `superRefine` blocks built inline,
30
+ * except that the sort is now the kind's own decision (RFC 0001 § Q9).
31
+ */
32
+ export declare function identityKeyOfObject(object: GeometryObject): string;
33
+ /**
34
+ * The resolved form of a v1 object, evaluated against points that have already
35
+ * been resolved for the scene it belongs to — `null` when it is not on screen.
36
+ *
37
+ * For the consumers that still hold a v1 object and a point map instead of a
38
+ * context; a caller holding an `IndexedGeometryContext` asks that, because its
39
+ * answers are cached and these are computed per call.
40
+ */
41
+ export declare function resolvedOfObject(object: GeometryObject, points: ReadonlyMap<PointId, Point>): ResolvedEntity | null;
42
+ //# sourceMappingURL=v1Bridge.d.ts.map