@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,8 @@
1
+ import { CanvasSize } from '../coordinates/transform.js';
2
+ import { MathViewport } from '../schemas/viewport.schema.js';
3
+ export declare function GeometryGrid({ viewport, canvas, visible, }: {
4
+ viewport: MathViewport;
5
+ canvas: CanvasSize;
6
+ visible: boolean;
7
+ }): import("react").JSX.Element;
8
+ //# sourceMappingURL=GeometryGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeometryGrid.d.ts","sourceRoot":"","sources":["../../src/renderer/GeometryGrid.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,YAAY,CAAA;IACtB,MAAM,EAAE,UAAU,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;CACjB,+BAuDA"}
@@ -0,0 +1,7 @@
1
+ import { ToolName } from '../schemas/exercise.schema.cjs';
2
+ import { CanvasSize } from '../coordinates/transform.cjs';
3
+ export interface GeometryInstrumentsProps {
4
+ tools: ToolName[];
5
+ canvas: CanvasSize;
6
+ }
7
+ export declare function GeometryInstruments({ tools, canvas }: GeometryInstrumentsProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { ToolName } from '../schemas/exercise.schema.js';
2
+ import { CanvasSize } from '../coordinates/transform.js';
3
+ export interface GeometryInstrumentsProps {
4
+ tools: ToolName[];
5
+ canvas: CanvasSize;
6
+ }
7
+ export declare function GeometryInstruments({ tools, canvas }: GeometryInstrumentsProps): import("react").JSX.Element;
8
+ //# sourceMappingURL=GeometryInstruments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeometryInstruments.d.ts","sourceRoot":"","sources":["../../src/renderer/GeometryInstruments.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAS1D,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,MAAM,EAAE,UAAU,CAAA;CACnB;AAqJD,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,wBAAwB,+BA0L9E"}
@@ -0,0 +1,11 @@
1
+ import { CanvasSize } from '../coordinates/transform.cjs';
2
+ import { Store } from '../store/createStore.cjs';
3
+ import { GeometryValidationFeedback } from '../validation/types.cjs';
4
+ import { StudentState } from '../store/studentStore.cjs';
5
+ export interface StudentGeometryCanvasProps {
6
+ store: Store<StudentState>;
7
+ size: CanvasSize;
8
+ validationFeedback?: GeometryValidationFeedback | null;
9
+ focusedGoalId?: string | null;
10
+ }
11
+ export declare function StudentGeometryCanvas({ store, size, validationFeedback, focusedGoalId, }: StudentGeometryCanvasProps): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { CanvasSize } from '../coordinates/transform.js';
2
+ import { Store } from '../store/createStore.js';
3
+ import { GeometryValidationFeedback } from '../validation/types.js';
4
+ import { StudentState } from '../store/studentStore.js';
5
+ export interface StudentGeometryCanvasProps {
6
+ store: Store<StudentState>;
7
+ size: CanvasSize;
8
+ validationFeedback?: GeometryValidationFeedback | null;
9
+ focusedGoalId?: string | null;
10
+ }
11
+ export declare function StudentGeometryCanvas({ store, size, validationFeedback, focusedGoalId, }: StudentGeometryCanvasProps): import("react").JSX.Element;
12
+ //# sourceMappingURL=StudentGeometryCanvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StudentGeometryCanvas.d.ts","sourceRoot":"","sources":["../../src/renderer/StudentGeometryCanvas.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACtF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AACrE,OAAO,EAYL,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAA;AAiB9B,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;IAC1B,IAAI,EAAE,UAAU,CAAA;IAChB,kBAAkB,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAA;IACtD,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAiBD,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,IAAI,EACJ,kBAAyB,EACzB,aAAoB,GACrB,EAAE,0BAA0B,+BAyM5B"}
@@ -0,0 +1,36 @@
1
+ import { GeometryState } from '../schemas/geometryState.schema.cjs';
2
+ import { ConstructionNotice, StudentGeometryChangeMeta } from '../store/studentStore.cjs';
3
+ import { CheckGeometryAnswerResult } from '../validation/checkGeometryAnswer.cjs';
4
+ import { StudentGeometryExerciseIssue } from './studentExerciseSession.cjs';
5
+ export type { StudentGeometryExerciseIssue } from './studentExerciseSession.cjs';
6
+ /** Which built-in controls are shown. Each defaults to `true`; hiding one changes no permission. */
7
+ export interface StudentGeometryControls {
8
+ toolbar?: boolean;
9
+ history?: boolean;
10
+ delete?: boolean;
11
+ reset?: boolean;
12
+ }
13
+ export interface StudentGeometryExerciseProps {
14
+ exercise: unknown;
15
+ value?: unknown;
16
+ onChange(attempt: GeometryState, meta: StudentGeometryChangeMeta): void;
17
+ readOnly?: boolean;
18
+ validationFeedback?: CheckGeometryAnswerResult | null;
19
+ focusedGoalId?: string | null;
20
+ controls?: StudentGeometryControls;
21
+ className?: string;
22
+ onNotice?(notice: ConstructionNotice): void;
23
+ onError?(issues: StudentGeometryExerciseIssue[]): void;
24
+ }
25
+ /**
26
+ * A complete, mobile-first student exercise for a host application (RFC 0005,
27
+ * ADR 0014): tools, history, delete, reset, the construction notice, a canvas
28
+ * that measures its own container and the semantic companion. The host keeps
29
+ * Check, Reveal, persistence and result wording.
30
+ *
31
+ * Controlled: `exercise` and `value` are untrusted and parsed on the way in,
32
+ * every completed student action reaches `onChange` once, and a different
33
+ * value or exercise replaces the attempt or the whole session on the same
34
+ * store without echoing. Every mount owns its store.
35
+ */
36
+ export declare function StudentGeometryExercise(props: StudentGeometryExerciseProps): import("react").JSX.Element | null;
@@ -0,0 +1,37 @@
1
+ import { GeometryState } from '../schemas/geometryState.schema.js';
2
+ import { ConstructionNotice, StudentGeometryChangeMeta } from '../store/studentStore.js';
3
+ import { CheckGeometryAnswerResult } from '../validation/checkGeometryAnswer.js';
4
+ import { StudentGeometryExerciseIssue } from './studentExerciseSession.js';
5
+ export type { StudentGeometryExerciseIssue } from './studentExerciseSession.js';
6
+ /** Which built-in controls are shown. Each defaults to `true`; hiding one changes no permission. */
7
+ export interface StudentGeometryControls {
8
+ toolbar?: boolean;
9
+ history?: boolean;
10
+ delete?: boolean;
11
+ reset?: boolean;
12
+ }
13
+ export interface StudentGeometryExerciseProps {
14
+ exercise: unknown;
15
+ value?: unknown;
16
+ onChange(attempt: GeometryState, meta: StudentGeometryChangeMeta): void;
17
+ readOnly?: boolean;
18
+ validationFeedback?: CheckGeometryAnswerResult | null;
19
+ focusedGoalId?: string | null;
20
+ controls?: StudentGeometryControls;
21
+ className?: string;
22
+ onNotice?(notice: ConstructionNotice): void;
23
+ onError?(issues: StudentGeometryExerciseIssue[]): void;
24
+ }
25
+ /**
26
+ * A complete, mobile-first student exercise for a host application (RFC 0005,
27
+ * ADR 0014): tools, history, delete, reset, the construction notice, a canvas
28
+ * that measures its own container and the semantic companion. The host keeps
29
+ * Check, Reveal, persistence and result wording.
30
+ *
31
+ * Controlled: `exercise` and `value` are untrusted and parsed on the way in,
32
+ * every completed student action reaches `onChange` once, and a different
33
+ * value or exercise replaces the attempt or the whole session on the same
34
+ * store without echoing. Every mount owns its store.
35
+ */
36
+ export declare function StudentGeometryExercise(props: StudentGeometryExerciseProps): import("react").JSX.Element | null;
37
+ //# sourceMappingURL=StudentGeometryExercise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StudentGeometryExercise.d.ts","sourceRoot":"","sources":["../../src/renderer/StudentGeometryExercise.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAEpE,OAAO,EAOL,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAE/B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAIlF,OAAO,EAOL,KAAK,4BAA4B,EAClC,MAAM,0BAA0B,CAAA;AAGjC,YAAY,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA;AAE5E,oGAAoG;AACpG,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,yBAAyB,GAAG,IAAI,CAAA;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;IACrD,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAC3C,OAAO,CAAC,CAAC,MAAM,EAAE,4BAA4B,EAAE,GAAG,IAAI,CAAA;CACvD;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,sCAiE1E"}
@@ -0,0 +1,7 @@
1
+ import { ObjectTypeName } from '../schemas/objectTypeName.schema.cjs';
2
+ export interface ToolbarProps {
3
+ selected: ObjectTypeName | null;
4
+ onSelect: (type: ObjectTypeName | null) => void;
5
+ available?: ObjectTypeName[];
6
+ }
7
+ export declare function Toolbar({ selected, onSelect, available }: ToolbarProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { ObjectTypeName } from '../schemas/objectTypeName.schema.js';
2
+ export interface ToolbarProps {
3
+ selected: ObjectTypeName | null;
4
+ onSelect: (type: ObjectTypeName | null) => void;
5
+ available?: ObjectTypeName[];
6
+ }
7
+ export declare function Toolbar({ selected, onSelect, available }: ToolbarProps): import("react").JSX.Element;
8
+ //# sourceMappingURL=Toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../src/renderer/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAEtE,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAA;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAA;IAC/C,SAAS,CAAC,EAAE,cAAc,EAAE,CAAA;CAC7B;AAgBD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAwB,EAAE,EAAE,YAAY,+BAgBrF"}
@@ -0,0 +1,15 @@
1
+ import { EntityCapabilities, EntityId } from '../geometry/entityModel.cjs';
2
+ import { SceneEntity } from '../geometry/hitTest.cjs';
3
+ import { Point, PointId } from '../geometry/point.cjs';
4
+ import { GeometryExercise } from '../schemas/exercise.schema.cjs';
5
+ import { GeometryState } from '../schemas/geometryState.schema.cjs';
6
+ import { TeacherEditorState } from '../store/teacherStore.cjs';
7
+ export interface RenderableGeometry {
8
+ points: ReadonlyMap<PointId, Point>;
9
+ objects: SceneEntity[];
10
+ capabilitiesOf: (id: EntityId) => Readonly<EntityCapabilities>;
11
+ labelOf: (id: EntityId) => string | undefined;
12
+ isSnapTarget: (id: EntityId) => boolean;
13
+ }
14
+ export declare function deriveRenderableGeometry(state: TeacherEditorState): RenderableGeometry;
15
+ export declare function deriveStudentRenderableGeometry(exercise: GeometryExercise, geometry: GeometryState): RenderableGeometry;
@@ -0,0 +1,16 @@
1
+ import { EntityCapabilities, EntityId } from '../geometry/entityModel.js';
2
+ import { SceneEntity } from '../geometry/hitTest.js';
3
+ import { Point, PointId } from '../geometry/point.js';
4
+ import { GeometryExercise } from '../schemas/exercise.schema.js';
5
+ import { GeometryState } from '../schemas/geometryState.schema.js';
6
+ import { TeacherEditorState } from '../store/teacherStore.js';
7
+ export interface RenderableGeometry {
8
+ points: ReadonlyMap<PointId, Point>;
9
+ objects: SceneEntity[];
10
+ capabilitiesOf: (id: EntityId) => Readonly<EntityCapabilities>;
11
+ labelOf: (id: EntityId) => string | undefined;
12
+ isSnapTarget: (id: EntityId) => boolean;
13
+ }
14
+ export declare function deriveRenderableGeometry(state: TeacherEditorState): RenderableGeometry;
15
+ export declare function deriveStudentRenderableGeometry(exercise: GeometryExercise, geometry: GeometryState): RenderableGeometry;
16
+ //# sourceMappingURL=deriveRenderableGeometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deriveRenderableGeometry.d.ts","sourceRoot":"","sources":["../../src/renderer/deriveRenderableGeometry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAmB,MAAM,yBAAyB,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAGpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAqB/D,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IACnC,OAAO,EAAE,WAAW,EAAE,CAAA;IAGtB,cAAc,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,QAAQ,CAAC,kBAAkB,CAAC,CAAA;IAQ9D,OAAO,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,MAAM,GAAG,SAAS,CAAA;IAK7C,YAAY,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAA;CACxC;AAID,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,GAAG,kBAAkB,CAsBtF;AAUD,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,aAAa,GACtB,kBAAkB,CAKpB"}
@@ -0,0 +1,58 @@
1
+ import { EntityId, EntityKind } from '../geometry/entityModel.cjs';
2
+ import { StudentState } from '../store/studentStore.cjs';
3
+ import { TeacherEditorState } from '../store/teacherStore.cjs';
4
+ import { GeometryValidationFeedback, GoalStatus } from '../validation/types.cjs';
5
+ import { EntityOwner } from './entityDisplayName.cjs';
6
+ export interface SemanticEntity {
7
+ readonly id: EntityId;
8
+ readonly kind: EntityKind;
9
+ readonly owner: EntityOwner;
10
+ readonly name: string;
11
+ readonly description: string;
12
+ readonly placed: boolean;
13
+ readonly selected: boolean;
14
+ readonly selectable: boolean;
15
+ readonly status: GoalStatus | null;
16
+ readonly text: string;
17
+ }
18
+ export interface SemanticScene {
19
+ readonly toolLine: string;
20
+ readonly pendingLine: string;
21
+ readonly answerLine: string | null;
22
+ readonly entities: readonly SemanticEntity[];
23
+ readonly selectedId: EntityId | null;
24
+ }
25
+ /**
26
+ * The student's figure: the exercise's givens and their own work, with the
27
+ * last check's verdict where it applies.
28
+ *
29
+ * `validationFeedback` and `focusedGoalId` are the canvas's own two props, and
30
+ * the per-entity verdict is derived through the same
31
+ * `deriveGeometryCanvasFeedback()` the canvas colours with — one goal's
32
+ * feedback, so the companion and the canvas can never disagree about which
33
+ * entities a check touched.
34
+ */
35
+ export declare function deriveStudentSemanticScene(state: StudentState, validationFeedback?: GeometryValidationFeedback | null, focusedGoalId?: string | null): SemanticScene;
36
+ /**
37
+ * The exercise being authored. Every entity belongs to the exercise, so every
38
+ * drawn one is selectable and none carries a verdict.
39
+ *
40
+ * Walked in declaration order rather than in resolution order, for the reason
41
+ * `deriveRenderableGeometry()` walks it that way: an author reordering the
42
+ * entity record expects both the figure and its description to follow.
43
+ */
44
+ export declare function deriveTeacherSemanticScene(state: TeacherEditorState): SemanticScene;
45
+ /**
46
+ * What changed between two scenes, as one sentence to put in a live region —
47
+ * `null` when nothing worth interrupting a construction for did.
48
+ *
49
+ * A pure function of the two scenes rather than a subscription, so what gets
50
+ * announced is assertable without a browser, and so a component can compute it
51
+ * from the scene it already holds.
52
+ *
53
+ * Deliberately silent about selection: the selected row carries
54
+ * `aria-pressed`, and it has focus, so announcing it would say the same thing
55
+ * twice. Also silent about drags — one message per pointer event is noise, and
56
+ * a drag ends in a construction that is announced.
57
+ */
58
+ export declare function announceSceneChange(previous: SemanticScene | null, next: SemanticScene): string | null;
@@ -0,0 +1,59 @@
1
+ import { EntityId, EntityKind } from '../geometry/entityModel.js';
2
+ import { StudentState } from '../store/studentStore.js';
3
+ import { TeacherEditorState } from '../store/teacherStore.js';
4
+ import { GeometryValidationFeedback, GoalStatus } from '../validation/types.js';
5
+ import { EntityOwner } from './entityDisplayName.js';
6
+ export interface SemanticEntity {
7
+ readonly id: EntityId;
8
+ readonly kind: EntityKind;
9
+ readonly owner: EntityOwner;
10
+ readonly name: string;
11
+ readonly description: string;
12
+ readonly placed: boolean;
13
+ readonly selected: boolean;
14
+ readonly selectable: boolean;
15
+ readonly status: GoalStatus | null;
16
+ readonly text: string;
17
+ }
18
+ export interface SemanticScene {
19
+ readonly toolLine: string;
20
+ readonly pendingLine: string;
21
+ readonly answerLine: string | null;
22
+ readonly entities: readonly SemanticEntity[];
23
+ readonly selectedId: EntityId | null;
24
+ }
25
+ /**
26
+ * The student's figure: the exercise's givens and their own work, with the
27
+ * last check's verdict where it applies.
28
+ *
29
+ * `validationFeedback` and `focusedGoalId` are the canvas's own two props, and
30
+ * the per-entity verdict is derived through the same
31
+ * `deriveGeometryCanvasFeedback()` the canvas colours with — one goal's
32
+ * feedback, so the companion and the canvas can never disagree about which
33
+ * entities a check touched.
34
+ */
35
+ export declare function deriveStudentSemanticScene(state: StudentState, validationFeedback?: GeometryValidationFeedback | null, focusedGoalId?: string | null): SemanticScene;
36
+ /**
37
+ * The exercise being authored. Every entity belongs to the exercise, so every
38
+ * drawn one is selectable and none carries a verdict.
39
+ *
40
+ * Walked in declaration order rather than in resolution order, for the reason
41
+ * `deriveRenderableGeometry()` walks it that way: an author reordering the
42
+ * entity record expects both the figure and its description to follow.
43
+ */
44
+ export declare function deriveTeacherSemanticScene(state: TeacherEditorState): SemanticScene;
45
+ /**
46
+ * What changed between two scenes, as one sentence to put in a live region —
47
+ * `null` when nothing worth interrupting a construction for did.
48
+ *
49
+ * A pure function of the two scenes rather than a subscription, so what gets
50
+ * announced is assertable without a browser, and so a component can compute it
51
+ * from the scene it already holds.
52
+ *
53
+ * Deliberately silent about selection: the selected row carries
54
+ * `aria-pressed`, and it has focus, so announcing it would say the same thing
55
+ * twice. Also silent about drags — one message per pointer event is noise, and
56
+ * a drag ends in a construction that is announced.
57
+ */
58
+ export declare function announceSceneChange(previous: SemanticScene | null, next: SemanticScene): string | null;
59
+ //# sourceMappingURL=deriveSemanticScene.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deriveSemanticScene.d.ts","sourceRoot":"","sources":["../../src/renderer/deriveSemanticScene.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAKnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACjF,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEzE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;IAG3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAK5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAG1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAG5B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAA;IAGlC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,aAAa;IAI5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAG5B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAA;IAC5C,QAAQ,CAAC,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAA;CACrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,YAAY,EACnB,kBAAkB,GAAE,0BAA0B,GAAG,IAAW,EAC5D,aAAa,GAAE,MAAM,GAAG,IAAW,GAClC,aAAa,CAwBf;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAkBnF;AAoGD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,aAAa,GAAG,IAAI,EAC9B,IAAI,EAAE,aAAa,GAClB,MAAM,GAAG,IAAI,CAwBf"}
@@ -0,0 +1,12 @@
1
+ import { EntityId } from '../geometry/entityModel.cjs';
2
+ /** Which document declared an entity — the half of naming an id cannot answer. */
3
+ export type EntityOwner = 'given' | 'student';
4
+ /**
5
+ * The name both surfaces use for `id`.
6
+ *
7
+ * `owner` decides whether the id is prettified, because only the student store
8
+ * promises the `student-<kind>-<n>` shape. An exercise may author an entity
9
+ * whose id happens to look like one, and rewriting a teacher's chosen id would
10
+ * be the canvas relabelling the exercise.
11
+ */
12
+ export declare function entityDisplayName(id: EntityId, label: string | undefined, owner: EntityOwner): string;
@@ -0,0 +1,13 @@
1
+ import { EntityId } from '../geometry/entityModel.js';
2
+ /** Which document declared an entity — the half of naming an id cannot answer. */
3
+ export type EntityOwner = 'given' | 'student';
4
+ /**
5
+ * The name both surfaces use for `id`.
6
+ *
7
+ * `owner` decides whether the id is prettified, because only the student store
8
+ * promises the `student-<kind>-<n>` shape. An exercise may author an entity
9
+ * whose id happens to look like one, and rewriting a teacher's chosen id would
10
+ * be the canvas relabelling the exercise.
11
+ */
12
+ export declare function entityDisplayName(id: EntityId, label: string | undefined, owner: EntityOwner): string;
13
+ //# sourceMappingURL=entityDisplayName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entityDisplayName.d.ts","sourceRoot":"","sources":["../../src/renderer/entityDisplayName.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAEvD,kFAAkF;AAClF,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,CAAA;AAI7C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,WAAW,UAS5F"}
@@ -0,0 +1,97 @@
1
+ import { CanvasSize } from '../coordinates/transform.cjs';
2
+ /**
3
+ * A position within the canvas, in the stage's own pixels from its top-left
4
+ * corner — the frame Konva draws and hit-tests in, and the one `screenToMath`
5
+ * converts from.
6
+ */
7
+ export interface ScreenPoint {
8
+ x: number;
9
+ y: number;
10
+ }
11
+ /**
12
+ * A pointer's viewport position, in the stage's own pixels. The stage may be
13
+ * displayed at another size than it is laid out at — a CSS transform on a host
14
+ * element, `zoom` on the page — so the offset into its displayed box is divided
15
+ * by the ratio between the two, which is exactly the conversion Konva applies to
16
+ * its own events. Without it, a stage displayed at half size would take every
17
+ * press at twice its distance from the corner.
18
+ */
19
+ export declare function toStagePoint(client: {
20
+ x: number;
21
+ y: number;
22
+ }, displayed: {
23
+ left: number;
24
+ top: number;
25
+ width: number;
26
+ height: number;
27
+ }, laidOut: {
28
+ width: number;
29
+ height: number;
30
+ }): ScreenPoint;
31
+ export declare const MOUSE_DRAG_THRESHOLD_PX = 4;
32
+ export declare const TOUCH_DRAG_THRESHOLD_PX = 8;
33
+ /**
34
+ * The displacement at which a contact of this pointer type becomes a drag. An
35
+ * unknown or empty `pointerType` is treated as a mouse: the tighter threshold
36
+ * can only turn a sloppy tap into a harmless drag, never the other way round.
37
+ */
38
+ export declare function dragThresholdPx(pointerType: string): number;
39
+ /**
40
+ * One pointer's contact with the canvas, from press to release.
41
+ *
42
+ * Measured in the viewport's CSS pixels — where the hand actually moved — and
43
+ * not in the stage's: a stage displayed at half size must not make a finger
44
+ * drag after 4 px of travel. `maxDisplacement` is the furthest the pointer has
45
+ * been from where it went down, not where it is now: a finger that wanders out
46
+ * and back has still dragged, and releasing where it started must not turn it
47
+ * back into a tap.
48
+ */
49
+ export interface PointerContact {
50
+ pointerId: number;
51
+ pointerType: string;
52
+ origin: ScreenPoint;
53
+ maxDisplacement: number;
54
+ dragging: boolean;
55
+ }
56
+ export declare function beginContact(pointerId: number, pointerType: string, origin: ScreenPoint): PointerContact;
57
+ /** The contact after the pointer reached `at`. At the threshold it is a drag. */
58
+ export declare function advanceContact(contact: PointerContact, at: ScreenPoint): PointerContact;
59
+ /**
60
+ * Whether a press may open a contact at all. Only a primary pointer does — a
61
+ * second finger is a cancellation, never a gesture of its own — and a mouse
62
+ * only with its main button, so a right-click or a middle-click builds nothing.
63
+ */
64
+ export declare function opensContact(press: {
65
+ isPrimary: boolean;
66
+ pointerType: string;
67
+ button: number;
68
+ }): boolean;
69
+ /**
70
+ * The stage container's style on both canvases. Every contact on the stage is
71
+ * the lifecycle's: a browser that pans, zooms or selects text under a finger
72
+ * that is drawing takes the pointer with `pointercancel`, and the gesture is
73
+ * lost to scrolling the page.
74
+ */
75
+ export declare const GESTURE_SURFACE_STYLE: {
76
+ readonly touchAction: "none";
77
+ readonly userSelect: "none";
78
+ readonly WebkitUserSelect: "none";
79
+ };
80
+ /** Whether a release landed on the canvas. Anywhere else cancels the gesture. */
81
+ export declare function isWithinCanvas(point: ScreenPoint, canvas: CanvasSize): boolean;
82
+ /**
83
+ * Why a gesture ended without completing. Every one of them clears the
84
+ * preview, the snap, the pending endpoint and the contact; only `escape` also
85
+ * disarms the tool.
86
+ */
87
+ export type GestureCancelReason = 'pointercancel' | 'second-pointer' | 'lost-capture' | 'outside-release' | 'blur' | 'hidden' | 'escape' | 'invalidated' | 'resize' | 'store-replaced' | 'unmount';
88
+ export declare function pointNodeId(id: string): string;
89
+ export declare function objectNodeId(id: string): string;
90
+ /** What a hit node's id names: a point, an object, or nothing of the figure's. */
91
+ export declare function nodeTarget(nodeId: string): {
92
+ kind: 'point';
93
+ id: string;
94
+ } | {
95
+ kind: 'object';
96
+ id: string;
97
+ } | null;
@@ -0,0 +1,98 @@
1
+ import { CanvasSize } from '../coordinates/transform.js';
2
+ /**
3
+ * A position within the canvas, in the stage's own pixels from its top-left
4
+ * corner — the frame Konva draws and hit-tests in, and the one `screenToMath`
5
+ * converts from.
6
+ */
7
+ export interface ScreenPoint {
8
+ x: number;
9
+ y: number;
10
+ }
11
+ /**
12
+ * A pointer's viewport position, in the stage's own pixels. The stage may be
13
+ * displayed at another size than it is laid out at — a CSS transform on a host
14
+ * element, `zoom` on the page — so the offset into its displayed box is divided
15
+ * by the ratio between the two, which is exactly the conversion Konva applies to
16
+ * its own events. Without it, a stage displayed at half size would take every
17
+ * press at twice its distance from the corner.
18
+ */
19
+ export declare function toStagePoint(client: {
20
+ x: number;
21
+ y: number;
22
+ }, displayed: {
23
+ left: number;
24
+ top: number;
25
+ width: number;
26
+ height: number;
27
+ }, laidOut: {
28
+ width: number;
29
+ height: number;
30
+ }): ScreenPoint;
31
+ export declare const MOUSE_DRAG_THRESHOLD_PX = 4;
32
+ export declare const TOUCH_DRAG_THRESHOLD_PX = 8;
33
+ /**
34
+ * The displacement at which a contact of this pointer type becomes a drag. An
35
+ * unknown or empty `pointerType` is treated as a mouse: the tighter threshold
36
+ * can only turn a sloppy tap into a harmless drag, never the other way round.
37
+ */
38
+ export declare function dragThresholdPx(pointerType: string): number;
39
+ /**
40
+ * One pointer's contact with the canvas, from press to release.
41
+ *
42
+ * Measured in the viewport's CSS pixels — where the hand actually moved — and
43
+ * not in the stage's: a stage displayed at half size must not make a finger
44
+ * drag after 4 px of travel. `maxDisplacement` is the furthest the pointer has
45
+ * been from where it went down, not where it is now: a finger that wanders out
46
+ * and back has still dragged, and releasing where it started must not turn it
47
+ * back into a tap.
48
+ */
49
+ export interface PointerContact {
50
+ pointerId: number;
51
+ pointerType: string;
52
+ origin: ScreenPoint;
53
+ maxDisplacement: number;
54
+ dragging: boolean;
55
+ }
56
+ export declare function beginContact(pointerId: number, pointerType: string, origin: ScreenPoint): PointerContact;
57
+ /** The contact after the pointer reached `at`. At the threshold it is a drag. */
58
+ export declare function advanceContact(contact: PointerContact, at: ScreenPoint): PointerContact;
59
+ /**
60
+ * Whether a press may open a contact at all. Only a primary pointer does — a
61
+ * second finger is a cancellation, never a gesture of its own — and a mouse
62
+ * only with its main button, so a right-click or a middle-click builds nothing.
63
+ */
64
+ export declare function opensContact(press: {
65
+ isPrimary: boolean;
66
+ pointerType: string;
67
+ button: number;
68
+ }): boolean;
69
+ /**
70
+ * The stage container's style on both canvases. Every contact on the stage is
71
+ * the lifecycle's: a browser that pans, zooms or selects text under a finger
72
+ * that is drawing takes the pointer with `pointercancel`, and the gesture is
73
+ * lost to scrolling the page.
74
+ */
75
+ export declare const GESTURE_SURFACE_STYLE: {
76
+ readonly touchAction: "none";
77
+ readonly userSelect: "none";
78
+ readonly WebkitUserSelect: "none";
79
+ };
80
+ /** Whether a release landed on the canvas. Anywhere else cancels the gesture. */
81
+ export declare function isWithinCanvas(point: ScreenPoint, canvas: CanvasSize): boolean;
82
+ /**
83
+ * Why a gesture ended without completing. Every one of them clears the
84
+ * preview, the snap, the pending endpoint and the contact; only `escape` also
85
+ * disarms the tool.
86
+ */
87
+ export type GestureCancelReason = 'pointercancel' | 'second-pointer' | 'lost-capture' | 'outside-release' | 'blur' | 'hidden' | 'escape' | 'invalidated' | 'resize' | 'store-replaced' | 'unmount';
88
+ export declare function pointNodeId(id: string): string;
89
+ export declare function objectNodeId(id: string): string;
90
+ /** What a hit node's id names: a point, an object, or nothing of the figure's. */
91
+ export declare function nodeTarget(nodeId: string): {
92
+ kind: 'point';
93
+ id: string;
94
+ } | {
95
+ kind: 'object';
96
+ id: string;
97
+ } | null;
98
+ //# sourceMappingURL=gesturePolicy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gesturePolicy.d.ts","sourceRoot":"","sources":["../../src/renderer/gesturePolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAW1D;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,SAAS,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACvE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACzC,WAAW,CAIb;AAKD,eAAO,MAAM,uBAAuB,IAAI,CAAA;AACxC,eAAO,MAAM,uBAAuB,IAAI,CAAA;AAExC;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,WAAW,CAAA;IACnB,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,WAAW,GAClB,cAAc,CAEhB;AAED,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,WAAW,GAAG,cAAc,CAQvF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAGV;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAA;AAEV,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAE9E;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC3B,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,iBAAiB,GACjB,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,QAAQ,GACR,gBAAgB,GAChB,SAAS,CAAA;AASb,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,kFAAkF;AAClF,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,GACb;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAQvE"}
@@ -0,0 +1,17 @@
1
+ import { CanvasSize } from '../../coordinates/transform.cjs';
2
+ import { Point } from '../../geometry/point.cjs';
3
+ import { MathViewport } from '../../schemas/viewport.schema.cjs';
4
+ export interface CircleShapeProps {
5
+ id: string;
6
+ center: Point;
7
+ radius: number;
8
+ viewport: MathViewport;
9
+ canvas: CanvasSize;
10
+ color?: string;
11
+ strokeWidth?: number;
12
+ dashed?: boolean;
13
+ selected?: boolean;
14
+ opacity?: number;
15
+ listening?: boolean;
16
+ }
17
+ export declare function CircleShape({ id, center, radius, viewport, canvas, color, strokeWidth, dashed, selected, opacity, listening, }: CircleShapeProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { CanvasSize } from '../../coordinates/transform.js';
2
+ import { Point } from '../../geometry/point.js';
3
+ import { MathViewport } from '../../schemas/viewport.schema.js';
4
+ export interface CircleShapeProps {
5
+ id: string;
6
+ center: Point;
7
+ radius: number;
8
+ viewport: MathViewport;
9
+ canvas: CanvasSize;
10
+ color?: string;
11
+ strokeWidth?: number;
12
+ dashed?: boolean;
13
+ selected?: boolean;
14
+ opacity?: number;
15
+ listening?: boolean;
16
+ }
17
+ export declare function CircleShape({ id, center, radius, viewport, canvas, color, strokeWidth, dashed, selected, opacity, listening, }: CircleShapeProps): import("react").JSX.Element;
18
+ //# sourceMappingURL=CircleShape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircleShape.d.ts","sourceRoot":"","sources":["../../../src/renderer/shapes/CircleShape.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAOjE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,KAAK,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,YAAY,CAAA;IACtB,MAAM,EAAE,UAAU,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAYD,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,KAAiB,EACjB,WAAe,EACf,MAAc,EACd,QAAgB,EAChB,OAAW,EACX,SAAgB,GACjB,EAAE,gBAAgB,+BAmBlB"}
@@ -0,0 +1,14 @@
1
+ import { CanvasSize } from '../../coordinates/transform.cjs';
2
+ import { ShapeDescriptor } from '../../geometry/entityModel.cjs';
3
+ import { Point } from '../../geometry/point.cjs';
4
+ import { MathViewport } from '../../schemas/viewport.schema.cjs';
5
+ export interface EntityLabelProps {
6
+ text: string;
7
+ descriptor: ShapeDescriptor;
8
+ viewport: MathViewport;
9
+ canvas: CanvasSize;
10
+ color?: string;
11
+ opacity?: number;
12
+ }
13
+ export declare function labelAnchorOf(descriptor: ShapeDescriptor, viewport: MathViewport): Point | null;
14
+ export declare function EntityLabel({ text, descriptor, viewport, canvas, color, opacity, }: EntityLabelProps): import("react").JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import { CanvasSize } from '../../coordinates/transform.js';
2
+ import { ShapeDescriptor } from '../../geometry/entityModel.js';
3
+ import { Point } from '../../geometry/point.js';
4
+ import { MathViewport } from '../../schemas/viewport.schema.js';
5
+ export interface EntityLabelProps {
6
+ text: string;
7
+ descriptor: ShapeDescriptor;
8
+ viewport: MathViewport;
9
+ canvas: CanvasSize;
10
+ color?: string;
11
+ opacity?: number;
12
+ }
13
+ export declare function labelAnchorOf(descriptor: ShapeDescriptor, viewport: MathViewport): Point | null;
14
+ export declare function EntityLabel({ text, descriptor, viewport, canvas, color, opacity, }: EntityLabelProps): import("react").JSX.Element | null;
15
+ //# sourceMappingURL=EntityLabel.d.ts.map