@mathscan/geometry-engine 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -7
- package/dist/core.cjs +1 -1
- package/dist/core.mjs +4 -4
- package/dist/entries/core.d.cts +1 -1
- package/dist/entries/core.d.ts +1 -1
- package/dist/entries/core.d.ts.map +1 -1
- package/dist/exercise.schema-Bma3qN9P.js +251 -0
- package/dist/exercise.schema-Bma3qN9P.js.map +1 -0
- package/dist/exercise.schema-Oj5ZH-yO.cjs +2 -0
- package/dist/exercise.schema-Oj5ZH-yO.cjs.map +1 -0
- package/dist/exerciseLoad-Db9Cigxi.cjs +2 -0
- package/dist/exerciseLoad-Db9Cigxi.cjs.map +1 -0
- package/dist/{geometryAttemptStatus-5L_q6-9l.js → exerciseLoad-DgeDXYbf.js} +84 -71
- package/dist/exerciseLoad-DgeDXYbf.js.map +1 -0
- package/dist/geometry/entities/angle.d.cts +56 -0
- package/dist/geometry/entities/angle.d.ts +57 -0
- package/dist/geometry/entities/angle.d.ts.map +1 -0
- package/dist/geometry/entities/circle.d.ts.map +1 -1
- package/dist/geometry/entities/index.d.cts +8 -4
- package/dist/geometry/entities/index.d.ts +8 -4
- package/dist/geometry/entities/index.d.ts.map +1 -1
- package/dist/geometry/entities/line.d.ts.map +1 -1
- package/dist/geometry/entities/point.d.ts.map +1 -1
- package/dist/geometry/entities/relations.d.cts +8 -1
- package/dist/geometry/entities/relations.d.ts +8 -1
- package/dist/geometry/entities/relations.d.ts.map +1 -1
- package/dist/geometry/entities/segment.d.ts.map +1 -1
- package/dist/geometry/entityModel.d.cts +21 -3
- package/dist/geometry/entityModel.d.ts +21 -3
- package/dist/geometry/entityModel.d.ts.map +1 -1
- package/dist/geometryState.schema-B5ccMKDa.cjs +2 -0
- package/dist/geometryState.schema-B5ccMKDa.cjs.map +1 -0
- package/dist/geometryState.schema-CKFPlX8j.js +1177 -0
- package/dist/geometryState.schema-CKFPlX8j.js.map +1 -0
- package/dist/goals-BlSeniyt.js +563 -0
- package/dist/goals-BlSeniyt.js.map +1 -0
- package/dist/goals-DLbmBZD8.cjs +2 -0
- package/dist/goals-DLbmBZD8.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +8 -8
- package/dist/measure/angleType.d.cts +2 -0
- package/dist/measure/angleType.d.ts +3 -0
- package/dist/measure/angleType.d.ts.map +1 -0
- package/dist/measure/geometryAdapter.d.cts +3 -0
- package/dist/measure/geometryAdapter.d.ts +3 -0
- package/dist/measure/geometryAdapter.d.ts.map +1 -1
- package/dist/react-B26_e52I.cjs +2 -0
- package/dist/react-B26_e52I.cjs.map +1 -0
- package/dist/{react-BEcdx1f6.js → react-B5cGaxH8.js} +738 -513
- package/dist/react-B5cGaxH8.js.map +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/renderer/GeometryCanvas.d.ts.map +1 -1
- package/dist/renderer/StudentGeometryCanvas.d.ts.map +1 -1
- package/dist/renderer/Toolbar.d.ts.map +1 -1
- package/dist/renderer/angleMeasure.d.cts +14 -0
- package/dist/renderer/angleMeasure.d.ts +15 -0
- package/dist/renderer/angleMeasure.d.ts.map +1 -0
- package/dist/renderer/deriveRenderableGeometry.d.cts +1 -0
- package/dist/renderer/deriveRenderableGeometry.d.ts +1 -0
- package/dist/renderer/deriveRenderableGeometry.d.ts.map +1 -1
- package/dist/renderer/deriveSemanticScene.d.ts.map +1 -1
- package/dist/renderer/dragSnap.d.cts +14 -0
- package/dist/renderer/dragSnap.d.ts +15 -0
- package/dist/renderer/dragSnap.d.ts.map +1 -0
- package/dist/renderer/shapes/AngleShape.d.cts +19 -0
- package/dist/renderer/shapes/AngleShape.d.ts +20 -0
- package/dist/renderer/shapes/AngleShape.d.ts.map +1 -0
- package/dist/renderer/shapes/EntityLabel.d.cts +9 -1
- package/dist/renderer/shapes/EntityLabel.d.ts +9 -1
- package/dist/renderer/shapes/EntityLabel.d.ts.map +1 -1
- package/dist/renderer/shapes/EntityShape.d.cts +2 -1
- package/dist/renderer/shapes/EntityShape.d.ts +2 -1
- package/dist/renderer/shapes/EntityShape.d.ts.map +1 -1
- package/dist/renderer/useConnectionPreview.d.cts +12 -1
- package/dist/renderer/useConnectionPreview.d.ts +12 -1
- package/dist/renderer/useConnectionPreview.d.ts.map +1 -1
- package/dist/renderer/usePointerGestures.d.cts +1 -1
- package/dist/renderer/usePointerGestures.d.ts +1 -1
- package/dist/renderer/usePointerGestures.d.ts.map +1 -1
- package/dist/schemas/entityDefinition.schema.d.cts +7 -0
- package/dist/schemas/entityDefinition.schema.d.ts +7 -0
- package/dist/schemas/entityDefinition.schema.d.ts.map +1 -1
- package/dist/schemas/entityDocument.d.cts +34 -13
- package/dist/schemas/entityDocument.d.ts +34 -13
- package/dist/schemas/entityDocument.d.ts.map +1 -1
- package/dist/schemas/entityPresentation.schema.d.cts +3 -0
- package/dist/schemas/entityPresentation.schema.d.ts +3 -0
- package/dist/schemas/entityPresentation.schema.d.ts.map +1 -1
- package/dist/schemas/exercise.schema.d.cts +80 -2
- package/dist/schemas/exercise.schema.d.ts +80 -2
- package/dist/schemas/exercise.schema.d.ts.map +1 -1
- package/dist/schemas/exerciseV2.schema.d.cts +57 -0
- package/dist/schemas/exerciseV2.schema.d.ts +57 -0
- package/dist/schemas/exerciseV2.schema.d.ts.map +1 -1
- package/dist/schemas/exerciseV4.schema.d.cts +168 -0
- package/dist/schemas/exerciseV4.schema.d.ts +169 -0
- package/dist/schemas/exerciseV4.schema.d.ts.map +1 -0
- package/dist/schemas/geometryState.schema.d.cts +8 -0
- package/dist/schemas/geometryState.schema.d.ts +8 -0
- package/dist/schemas/geometryState.schema.d.ts.map +1 -1
- package/dist/schemas/goals/angleBisectorGoal.schema.d.cts +15 -0
- package/dist/schemas/goals/angleBisectorGoal.schema.d.ts +16 -0
- package/dist/schemas/goals/angleBisectorGoal.schema.d.ts.map +1 -0
- package/dist/schemas/goals/angleCriterion.schema.d.cts +28 -0
- package/dist/schemas/goals/angleCriterion.schema.d.ts +29 -0
- package/dist/schemas/goals/angleCriterion.schema.d.ts.map +1 -0
- package/dist/schemas/goals/angleMeasureGoal.schema.d.cts +26 -0
- package/dist/schemas/goals/angleMeasureGoal.schema.d.ts +27 -0
- package/dist/schemas/goals/angleMeasureGoal.schema.d.ts.map +1 -0
- package/dist/schemas/goals/createGoal.schema.d.cts +1 -0
- package/dist/schemas/goals/createGoal.schema.d.ts +1 -0
- package/dist/schemas/goals/createGoal.schema.d.ts.map +1 -1
- package/dist/schemas/goals/geometryGoal.schema.d.cts +61 -0
- package/dist/schemas/goals/geometryGoal.schema.d.ts +61 -0
- package/dist/schemas/goals/geometryGoal.schema.d.ts.map +1 -1
- package/dist/schemas/goals/givenAngleGoal.schema.d.cts +35 -0
- package/dist/schemas/goals/givenAngleGoal.schema.d.ts +36 -0
- package/dist/schemas/goals/givenAngleGoal.schema.d.ts.map +1 -0
- package/dist/schemas/goals/goalKindDeclaration.d.cts +7 -0
- package/dist/schemas/goals/goalKindDeclaration.d.ts +7 -0
- package/dist/schemas/goals/goalKindDeclaration.d.ts.map +1 -1
- package/dist/schemas/goals/parallelGoal.schema.d.cts +1 -0
- package/dist/schemas/goals/parallelGoal.schema.d.ts +1 -0
- package/dist/schemas/goals/parallelGoal.schema.d.ts.map +1 -1
- package/dist/schemas/goals/perpendicularGoal.schema.d.cts +1 -0
- package/dist/schemas/goals/perpendicularGoal.schema.d.ts +1 -0
- package/dist/schemas/goals/perpendicularGoal.schema.d.ts.map +1 -1
- package/dist/schemas/goals/throughPointsGoal.schema.d.cts +1 -0
- package/dist/schemas/goals/throughPointsGoal.schema.d.ts +1 -0
- package/dist/schemas/goals/throughPointsGoal.schema.d.ts.map +1 -1
- package/dist/schemas/objectTypeName.schema.d.cts +1 -0
- package/dist/schemas/objectTypeName.schema.d.ts +1 -0
- package/dist/schemas/objectTypeName.schema.d.ts.map +1 -1
- package/dist/schemas/v2ToV3.d.cts +15 -1
- package/dist/schemas/v2ToV3.d.ts +15 -1
- package/dist/schemas/v2ToV3.d.ts.map +1 -1
- package/dist/schemas/v3ToV4.d.cts +2 -1
- package/dist/schemas/v3ToV4.d.ts +2 -1
- package/dist/schemas/v3ToV4.d.ts.map +1 -1
- package/dist/schemas/v4ToV5.d.cts +7 -0
- package/dist/schemas/v4ToV5.d.ts +8 -0
- package/dist/schemas/v4ToV5.d.ts.map +1 -0
- package/dist/schemas.cjs +1 -1
- package/dist/schemas.mjs +3 -3
- package/dist/snapping/computeDragSnap.d.cts +30 -0
- package/dist/snapping/computeDragSnap.d.ts +31 -0
- package/dist/snapping/computeDragSnap.d.ts.map +1 -0
- package/dist/state/geometryContext.d.ts.map +1 -1
- package/dist/store/attemptChange.d.cts +1 -1
- package/dist/store/attemptChange.d.ts +1 -1
- package/dist/store/attemptChange.d.ts.map +1 -1
- package/dist/store/constructionCommand.d.cts +14 -2
- package/dist/store/constructionCommand.d.ts +14 -2
- package/dist/store/constructionCommand.d.ts.map +1 -1
- package/dist/store/constructionIdentity.d.cts +9 -0
- package/dist/store/constructionIdentity.d.ts +9 -0
- package/dist/store/constructionIdentity.d.ts.map +1 -1
- package/dist/store/studentStore.d.cts +7 -0
- package/dist/store/studentStore.d.ts +7 -0
- package/dist/store/studentStore.d.ts.map +1 -1
- package/dist/store/teacherStore.d.cts +16 -0
- package/dist/store/teacherStore.d.ts +16 -0
- package/dist/store/teacherStore.d.ts.map +1 -1
- package/dist/{studentStore-CEKTtMCh.js → studentStore-CyYa0N93.js} +502 -370
- package/dist/studentStore-CyYa0N93.js.map +1 -0
- package/dist/studentStore-ubldy4PJ.cjs +2 -0
- package/dist/studentStore-ubldy4PJ.cjs.map +1 -0
- package/dist/validation/getGeometryExerciseWarnings.d.cts +3 -2
- package/dist/validation/getGeometryExerciseWarnings.d.ts +3 -2
- package/dist/validation/getGeometryExerciseWarnings.d.ts.map +1 -1
- package/dist/validation/goals/angleBisector.d.cts +3 -0
- package/dist/validation/goals/angleBisector.d.ts +4 -0
- package/dist/validation/goals/angleBisector.d.ts.map +1 -0
- package/dist/validation/goals/angleCriterion.d.cts +12 -0
- package/dist/validation/goals/angleCriterion.d.ts +13 -0
- package/dist/validation/goals/angleCriterion.d.ts.map +1 -0
- package/dist/validation/goals/angleMeasure.d.cts +9 -0
- package/dist/validation/goals/angleMeasure.d.ts +10 -0
- package/dist/validation/goals/angleMeasure.d.ts.map +1 -0
- package/dist/validation/goals/create.d.cts +2 -2
- package/dist/validation/goals/create.d.ts +2 -2
- package/dist/validation/goals/create.d.ts.map +1 -1
- package/dist/validation/goals/givenAngle.d.cts +11 -0
- package/dist/validation/goals/givenAngle.d.ts +12 -0
- package/dist/validation/goals/givenAngle.d.ts.map +1 -0
- package/dist/validation/goals/goalKindHandler.d.cts +38 -1
- package/dist/validation/goals/goalKindHandler.d.ts +38 -1
- package/dist/validation/goals/goalKindHandler.d.ts.map +1 -1
- package/dist/validation/goals/index.d.cts +9 -2
- package/dist/validation/goals/index.d.ts +9 -2
- package/dist/validation/goals/index.d.ts.map +1 -1
- package/dist/validation/goals/midpoint.d.cts +2 -2
- package/dist/validation/goals/midpoint.d.ts +2 -2
- package/dist/validation/goals/midpoint.d.ts.map +1 -1
- package/dist/validation/goals/parallel.d.cts +2 -2
- package/dist/validation/goals/parallel.d.ts +2 -2
- package/dist/validation/goals/parallel.d.ts.map +1 -1
- package/dist/validation/goals/perpendicular.d.cts +2 -2
- package/dist/validation/goals/perpendicular.d.ts +2 -2
- package/dist/validation/goals/perpendicular.d.ts.map +1 -1
- package/dist/validation/goals/segmentLength.d.cts +2 -2
- package/dist/validation/goals/segmentLength.d.ts +2 -2
- package/dist/validation/goals/segmentLength.d.ts.map +1 -1
- package/dist/validation/goals/throughPoints.d.cts +2 -2
- package/dist/validation/goals/throughPoints.d.ts +2 -2
- package/dist/validation/goals/throughPoints.d.ts.map +1 -1
- package/dist/validation/types.d.cts +5 -1
- package/dist/validation/types.d.ts +5 -1
- package/dist/validation/types.d.ts.map +1 -1
- package/dist/validation/validateGeometryState.d.ts.map +1 -1
- package/dist/validation/validateGeometryStateInput.d.ts.map +1 -1
- package/dist/validation.cjs +1 -1
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.mjs +106 -85
- package/dist/validation.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/exercise.schema-BV2b7rtN.cjs +0 -2
- package/dist/exercise.schema-BV2b7rtN.cjs.map +0 -1
- package/dist/exercise.schema-ckVBW9XA.js +0 -212
- package/dist/exercise.schema-ckVBW9XA.js.map +0 -1
- package/dist/geometryAttemptStatus-5L_q6-9l.js.map +0 -1
- package/dist/geometryAttemptStatus-N_XHIkiS.cjs +0 -2
- package/dist/geometryAttemptStatus-N_XHIkiS.cjs.map +0 -1
- package/dist/geometryState.schema-D0ixyGYE.js +0 -955
- package/dist/geometryState.schema-D0ixyGYE.js.map +0 -1
- package/dist/geometryState.schema-DKQ-durx.cjs +0 -2
- package/dist/geometryState.schema-DKQ-durx.cjs.map +0 -1
- package/dist/goals-C3ZwbEh_.js +0 -451
- package/dist/goals-C3ZwbEh_.js.map +0 -1
- package/dist/goals-CxR5qPDC.cjs +0 -2
- package/dist/goals-CxR5qPDC.cjs.map +0 -1
- package/dist/react-BEcdx1f6.js.map +0 -1
- package/dist/react-Pp_VSk--.cjs +0 -2
- package/dist/react-Pp_VSk--.cjs.map +0 -1
- package/dist/studentStore-CEKTtMCh.js.map +0 -1
- package/dist/studentStore-DLftfFAl.cjs +0 -2
- package/dist/studentStore-DLftfFAl.cjs.map +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The first **figure goal** (ADR 0016): it judges a given angle as the evaluated
|
|
4
|
+
* figure resolves it, rather than an entity the student built.
|
|
5
|
+
*
|
|
6
|
+
* An exercise that pins an angle's vertex and first arm and lets the student
|
|
7
|
+
* drag the second has no candidate to grade — a given is never a candidate
|
|
8
|
+
* (ADR 0008 § Amendment) — so its only subject is the figure itself. What makes
|
|
9
|
+
* that safe is the override invariant: an attempt may move an authorized point
|
|
10
|
+
* and nothing else, so the figure judged here is the exercise's.
|
|
11
|
+
*/
|
|
12
|
+
export declare const givenAngleGoalSchema: z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
type: z.ZodLiteral<"givenAngle">;
|
|
15
|
+
angleId: z.ZodString;
|
|
16
|
+
interpretation: z.ZodEnum<{
|
|
17
|
+
directed: "directed";
|
|
18
|
+
undirected: "undirected";
|
|
19
|
+
}>;
|
|
20
|
+
criterion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
21
|
+
kind: z.ZodLiteral<"degrees">;
|
|
22
|
+
targetDegrees: z.ZodNumber;
|
|
23
|
+
toleranceDegrees: z.ZodNumber;
|
|
24
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<"type">;
|
|
26
|
+
angleType: z.ZodEnum<{
|
|
27
|
+
acute: "acute";
|
|
28
|
+
right: "right";
|
|
29
|
+
obtuse: "obtuse";
|
|
30
|
+
straight: "straight";
|
|
31
|
+
reflex: "reflex";
|
|
32
|
+
}>;
|
|
33
|
+
}, z.core.$strict>], "kind">;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
export type GivenAngleGoal = z.infer<typeof givenAngleGoalSchema>;
|
|
36
|
+
//# sourceMappingURL=givenAngleGoal.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"givenAngleGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/givenAngleGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;kBAUtB,CAAA;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -28,6 +28,13 @@ export interface GoalAuthoringIssue {
|
|
|
28
28
|
*/
|
|
29
29
|
export interface GoalAuthoringContext {
|
|
30
30
|
definitionOf(id: string): EntityDefinition | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the student may drag this given (ADR 0016) — listed in
|
|
33
|
+
* `draggableEntityIds` *and* a free or `on` point. A figure goal needs it:
|
|
34
|
+
* definitions alone cannot say whether the figure it judges can move, and the
|
|
35
|
+
* rule is `isStudentDraggableGiven()`'s, asked here rather than restated.
|
|
36
|
+
*/
|
|
37
|
+
isStudentDraggable(id: string): boolean;
|
|
31
38
|
}
|
|
32
39
|
export interface GoalKindDeclaration<TGoal extends GeometryGoal = GeometryGoal> {
|
|
33
40
|
kind: TGoal['type'];
|
|
@@ -28,6 +28,13 @@ export interface GoalAuthoringIssue {
|
|
|
28
28
|
*/
|
|
29
29
|
export interface GoalAuthoringContext {
|
|
30
30
|
definitionOf(id: string): EntityDefinition | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the student may drag this given (ADR 0016) — listed in
|
|
33
|
+
* `draggableEntityIds` *and* a free or `on` point. A figure goal needs it:
|
|
34
|
+
* definitions alone cannot say whether the figure it judges can move, and the
|
|
35
|
+
* rule is `isStudentDraggableGiven()`'s, asked here rather than restated.
|
|
36
|
+
*/
|
|
37
|
+
isStudentDraggable(id: string): boolean;
|
|
31
38
|
}
|
|
32
39
|
export interface GoalKindDeclaration<TGoal extends GeometryGoal = GeometryGoal> {
|
|
33
40
|
kind: TGoal['type'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goalKindDeclaration.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/goalKindDeclaration.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAA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AAC,YAAY,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACrF,CAAA;AA6FD,eAAO,MAAM,oBAAoB,EAAE,2BA+IK,CAAA;AAQxC,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,mBAAmB,CAEtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parallelGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/parallelGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"parallelGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/parallelGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;kBASpB,CAAA;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perpendicularGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/perpendicularGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"perpendicularGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/perpendicularGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;kBASzB,CAAA;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"throughPointsGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/throughPointsGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"throughPointsGoal.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/goals/throughPointsGoal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;kBAOzB,CAAA;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectTypeName.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/objectTypeName.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"objectTypeName.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/objectTypeName.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,oBAAoB;;;;;;EAA0D,CAAA;AAE3F,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -13,6 +13,17 @@ export interface DocumentGate {
|
|
|
13
13
|
success: boolean;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
+
type Projection = (document: Record<string, unknown>) => Record<string, unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* What each side of a gate is asked about, identity by default. The hops after
|
|
19
|
+
* version 3 ask without `solution`: it is an attempt document that migrates and
|
|
20
|
+
* validates on its own path (ADR 0015), so whether a stored solution parses must
|
|
21
|
+
* never decide whether the exercise around it is newer vocabulary.
|
|
22
|
+
*/
|
|
23
|
+
export interface ExerciseStepProjection {
|
|
24
|
+
frozen?: Projection;
|
|
25
|
+
next?: Projection;
|
|
26
|
+
}
|
|
16
27
|
/**
|
|
17
28
|
* An exercise hop that adds vocabulary and changes nothing it already had. The
|
|
18
29
|
* refusal rule, stated exactly: **a document that is invalid at `from` and
|
|
@@ -31,7 +42,10 @@ export interface DocumentGate {
|
|
|
31
42
|
* `frozenSchema` must be a transcription of version `from` and `nextSchema` the
|
|
32
43
|
* parser of version `from + 1` — frozen as well unless that is the current one,
|
|
33
44
|
* because a current schema's version literal would never accept the promotion.
|
|
45
|
+
* `projection` says what each side is shown (ADR 0019); it only narrows the
|
|
46
|
+
* question, and the document that travels on is always the input.
|
|
34
47
|
*/
|
|
35
|
-
export declare function createIdentityExerciseStep(from: number, frozenSchema: ZodType, nextSchema: DocumentGate): MigrationStep;
|
|
48
|
+
export declare function createIdentityExerciseStep(from: number, frozenSchema: ZodType, nextSchema: DocumentGate, projection?: ExerciseStepProjection): MigrationStep;
|
|
36
49
|
/** The v2 → v3 hop, gated against the version 3 schema it is given. */
|
|
37
50
|
export declare function createGeometryExerciseV2ToV3(v3ExerciseSchema: DocumentGate): MigrationStep;
|
|
51
|
+
export {};
|
package/dist/schemas/v2ToV3.d.ts
CHANGED
|
@@ -13,6 +13,17 @@ export interface DocumentGate {
|
|
|
13
13
|
success: boolean;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
+
type Projection = (document: Record<string, unknown>) => Record<string, unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* What each side of a gate is asked about, identity by default. The hops after
|
|
19
|
+
* version 3 ask without `solution`: it is an attempt document that migrates and
|
|
20
|
+
* validates on its own path (ADR 0015), so whether a stored solution parses must
|
|
21
|
+
* never decide whether the exercise around it is newer vocabulary.
|
|
22
|
+
*/
|
|
23
|
+
export interface ExerciseStepProjection {
|
|
24
|
+
frozen?: Projection;
|
|
25
|
+
next?: Projection;
|
|
26
|
+
}
|
|
16
27
|
/**
|
|
17
28
|
* An exercise hop that adds vocabulary and changes nothing it already had. The
|
|
18
29
|
* refusal rule, stated exactly: **a document that is invalid at `from` and
|
|
@@ -31,8 +42,11 @@ export interface DocumentGate {
|
|
|
31
42
|
* `frozenSchema` must be a transcription of version `from` and `nextSchema` the
|
|
32
43
|
* parser of version `from + 1` — frozen as well unless that is the current one,
|
|
33
44
|
* because a current schema's version literal would never accept the promotion.
|
|
45
|
+
* `projection` says what each side is shown (ADR 0019); it only narrows the
|
|
46
|
+
* question, and the document that travels on is always the input.
|
|
34
47
|
*/
|
|
35
|
-
export declare function createIdentityExerciseStep(from: number, frozenSchema: ZodType, nextSchema: DocumentGate): MigrationStep;
|
|
48
|
+
export declare function createIdentityExerciseStep(from: number, frozenSchema: ZodType, nextSchema: DocumentGate, projection?: ExerciseStepProjection): MigrationStep;
|
|
36
49
|
/** The v2 → v3 hop, gated against the version 3 schema it is given. */
|
|
37
50
|
export declare function createGeometryExerciseV2ToV3(v3ExerciseSchema: DocumentGate): MigrationStep;
|
|
51
|
+
export {};
|
|
38
52
|
//# sourceMappingURL=v2ToV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2ToV3.d.ts","sourceRoot":"","sources":["../../src/schemas/v2ToV3.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v2ToV3.d.ts","sourceRoot":"","sources":["../../src/schemas/v2ToV3.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAG9C,2CAA2C;AAC3C,eAAO,MAAM,eAAe,IAAI,CAAA;AAEhC;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAA;CAChD;AAED,KAAK,UAAU,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEhF;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB;AAoBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,OAAO,EACrB,UAAU,EAAE,YAAY,EACxB,UAAU,GAAE,sBAA2B,GACtC,aAAa,CAsBf;AAED,uEAAuE;AACvE,wBAAgB,4BAA4B,CAAC,gBAAgB,EAAE,YAAY,GAAG,aAAa,CAE1F"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { MigrationStep } from './migrate.cjs';
|
|
2
2
|
import { DocumentGate } from './v2ToV3.cjs';
|
|
3
|
-
|
|
3
|
+
/** The v3 → v4 hop, gated against the frozen version 4 unless a test substitutes one. */
|
|
4
|
+
export declare function createGeometryExerciseV3ToV4(v4ExerciseSchema?: DocumentGate): MigrationStep;
|
package/dist/schemas/v3ToV4.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MigrationStep } from './migrate.js';
|
|
2
2
|
import { DocumentGate } from './v2ToV3.js';
|
|
3
|
-
|
|
3
|
+
/** The v3 → v4 hop, gated against the frozen version 4 unless a test substitutes one. */
|
|
4
|
+
export declare function createGeometryExerciseV3ToV4(v4ExerciseSchema?: DocumentGate): MigrationStep;
|
|
4
5
|
//# sourceMappingURL=v3ToV4.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3ToV4.d.ts","sourceRoot":"","sources":["../../src/schemas/v3ToV4.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v3ToV4.d.ts","sourceRoot":"","sources":["../../src/schemas/v3ToV4.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAI9C,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAExE,yFAAyF;AACzF,wBAAgB,4BAA4B,CAC1C,gBAAgB,GAAE,YAAuC,GACxD,aAAa,CAIf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationStep } from './migrate.cjs';
|
|
2
|
+
import { DocumentGate } from './v2ToV3.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* The v4 → v5 hop, gated against the version 5 schema it is given — the current
|
|
5
|
+
* one, passed in to keep this module out of a cycle with `exercise.schema.ts`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createGeometryExerciseV4ToV5(v5ExerciseSchema: DocumentGate): MigrationStep;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MigrationStep } from './migrate.js';
|
|
2
|
+
import { DocumentGate } from './v2ToV3.js';
|
|
3
|
+
/**
|
|
4
|
+
* The v4 → v5 hop, gated against the version 5 schema it is given — the current
|
|
5
|
+
* one, passed in to keep this module out of a cycle with `exercise.schema.ts`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createGeometryExerciseV4ToV5(v5ExerciseSchema: DocumentGate): MigrationStep;
|
|
8
|
+
//# sourceMappingURL=v4ToV5.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v4ToV5.d.ts","sourceRoot":"","sources":["../../src/schemas/v4ToV5.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAG9C,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAExE;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,gBAAgB,EAAE,YAAY,GAAG,aAAa,CAK1F"}
|
package/dist/schemas.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./geometryState.schema-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./geometryState.schema-B5ccMKDa.cjs"),t=require("./exercise.schema-Oj5ZH-yO.cjs");exports.applyMigrations=e.o,exports.createGoalSchema=e.b,exports.exerciseGradingSchema=t.t,exports.extraObjectPolicySchema=t.n,exports.geometryExerciseMigrations=t.r,exports.geometryExerciseSchema=t.i,exports.geometryGoalSchema=t.l,exports.geometryIdSchema=e.j,exports.geometryStateMigrations=e.t,exports.geometryStateSchema=e.n,exports.latestGeometryExerciseVersion=t.a,exports.latestGeometryStateVersion=e.r,exports.mathViewportSchema=t.u,exports.midpointGoalSchema=e.v,exports.migrateGeometryExercise=t.o,exports.migrateGeometryState=e.i,exports.objectTypeNameSchema=e.C,exports.parallelGoalSchema=e._,exports.parseGeometryExercise=t.s,exports.perpendicularGoalSchema=e.g,exports.pointSchema=e.l,exports.segmentLengthGoalSchema=e.h,exports.throughPointsGoalSchema=e.m,exports.toolNameSchema=t.c;
|
package/dist/schemas.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as m, c as h, i as g, l as _, n as v, o as y, r as b, s as x, t as S, u as C } from "./exercise.schema-
|
|
3
|
-
export {
|
|
1
|
+
import { C as e, _ as t, b as n, g as r, h as i, i as a, j as o, l as s, m as c, n as l, o as u, r as d, t as f, v as p } from "./geometryState.schema-CKFPlX8j.js";
|
|
2
|
+
import { a as m, c as h, i as g, l as _, n as v, o as y, r as b, s as x, t as S, u as C } from "./exercise.schema-Bma3qN9P.js";
|
|
3
|
+
export { u as applyMigrations, n as createGoalSchema, S as exerciseGradingSchema, v as extraObjectPolicySchema, b as geometryExerciseMigrations, g as geometryExerciseSchema, _ as geometryGoalSchema, o as geometryIdSchema, f as geometryStateMigrations, l as geometryStateSchema, m as latestGeometryExerciseVersion, d as latestGeometryStateVersion, C as mathViewportSchema, p as midpointGoalSchema, y as migrateGeometryExercise, a as migrateGeometryState, e as objectTypeNameSchema, t as parallelGoalSchema, x as parseGeometryExercise, r as perpendicularGoalSchema, s as pointSchema, i as segmentLengthGoalSchema, c as throughPointsGoalSchema, h as toolNameSchema };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EntityId } from '../geometry/entityModel.cjs';
|
|
2
|
+
import { Point, PointId } from '../geometry/point.cjs';
|
|
3
|
+
import { GeometryGoal } from '../schemas/goals/geometryGoal.schema.cjs';
|
|
4
|
+
import { SnapScene } from './computeSnap.cjs';
|
|
5
|
+
export declare const DRAG_ANGLE_STEP_DEGREES = 1;
|
|
6
|
+
export interface DragSnapInput {
|
|
7
|
+
scene: SnapScene;
|
|
8
|
+
pointId: PointId;
|
|
9
|
+
pointer: Point;
|
|
10
|
+
start: Point;
|
|
11
|
+
free: boolean;
|
|
12
|
+
tolerance: number;
|
|
13
|
+
judgedAngleIds: ReadonlySet<EntityId>;
|
|
14
|
+
isExerciseEntity: (id: EntityId) => boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The angles a goal judges, which an arm drag prefers (ADR 0018 § choice
|
|
18
|
+
* order). Exhaustive on purpose: a new goal kind is a compile error here until
|
|
19
|
+
* someone answers whether it judges an angle.
|
|
20
|
+
*/
|
|
21
|
+
export declare function judgedAngleIdsOf(goals: readonly GeometryGoal[]): ReadonlySet<EntityId>;
|
|
22
|
+
/**
|
|
23
|
+
* The position to hand the store, or null to write nothing this frame.
|
|
24
|
+
*
|
|
25
|
+
* A free point that is an arm (parent 0 or 2, not the vertex) of a resolved
|
|
26
|
+
* angle rotates about the chosen angle's vertex at its gesture-start length, to
|
|
27
|
+
* the pointer's sweep rounded half-up to a whole degree. Any other free point
|
|
28
|
+
* snaps to a shown grid within tolerance. Nothing snaps to another point.
|
|
29
|
+
*/
|
|
30
|
+
export declare function computeDragSnap(input: DragSnapInput): Point | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EntityId } from '../geometry/entityModel.js';
|
|
2
|
+
import { Point, PointId } from '../geometry/point.js';
|
|
3
|
+
import { GeometryGoal } from '../schemas/goals/geometryGoal.schema.js';
|
|
4
|
+
import { SnapScene } from './computeSnap.js';
|
|
5
|
+
export declare const DRAG_ANGLE_STEP_DEGREES = 1;
|
|
6
|
+
export interface DragSnapInput {
|
|
7
|
+
scene: SnapScene;
|
|
8
|
+
pointId: PointId;
|
|
9
|
+
pointer: Point;
|
|
10
|
+
start: Point;
|
|
11
|
+
free: boolean;
|
|
12
|
+
tolerance: number;
|
|
13
|
+
judgedAngleIds: ReadonlySet<EntityId>;
|
|
14
|
+
isExerciseEntity: (id: EntityId) => boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The angles a goal judges, which an arm drag prefers (ADR 0018 § choice
|
|
18
|
+
* order). Exhaustive on purpose: a new goal kind is a compile error here until
|
|
19
|
+
* someone answers whether it judges an angle.
|
|
20
|
+
*/
|
|
21
|
+
export declare function judgedAngleIdsOf(goals: readonly GeometryGoal[]): ReadonlySet<EntityId>;
|
|
22
|
+
/**
|
|
23
|
+
* The position to hand the store, or null to write nothing this frame.
|
|
24
|
+
*
|
|
25
|
+
* A free point that is an arm (parent 0 or 2, not the vertex) of a resolved
|
|
26
|
+
* angle rotates about the chosen angle's vertex at its gesture-start length, to
|
|
27
|
+
* the pointer's sweep rounded half-up to a whole degree. Any other free point
|
|
28
|
+
* snaps to a shown grid within tolerance. Nothing snaps to another point.
|
|
29
|
+
*/
|
|
30
|
+
export declare function computeDragSnap(input: DragSnapInput): Point | null;
|
|
31
|
+
//# sourceMappingURL=computeDragSnap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeDragSnap.d.ts","sourceRoot":"","sources":["../../src/snapping/computeDragSnap.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,QAAQ,EAAiB,MAAM,yBAAyB,CAAA;AACvF,OAAO,EAAmB,KAAK,KAAK,EAAE,KAAK,OAAO,E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C,EAAE,EAAE,QAAQ,GAAG,SAAS,QAAQ,EAAE,CAAA;IAI5C,gBAAgB,CAAC,EAAE,EAAE,QAAQ,GAAG,SAAS,QAAQ,EAAE,CAAA;IAKnD,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IAK5C,UAAU,CAAC,EAAE,EAAE,QAAQ,GAAG,cAAc,GAAG,IAAI,CAAA;IAI/C,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAA;IAC/C,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAA;IAInC,WAAW,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAA;CAC1E;AAuLD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,aAAa,GACtB,sBAAsB,CA2LxB"}
|
|
@@ -6,7 +6,7 @@ import { GeometryState } from '../schemas/geometryState.schema.cjs';
|
|
|
6
6
|
* may grow additively, so a consumer treats a value it does not know as a
|
|
7
7
|
* generic change.
|
|
8
8
|
*/
|
|
9
|
-
export type StudentGeometryAction = 'point-placed' | 'point-promoted' | 'segment-created' | 'line-created' | 'point-moved' | 'deleted' | 'undo' | 'redo' | 'reset' | 'revealed';
|
|
9
|
+
export type StudentGeometryAction = 'point-placed' | 'point-promoted' | 'segment-created' | 'line-created' | 'angle-created' | 'point-moved' | 'deleted' | 'undo' | 'redo' | 'reset' | 'revealed';
|
|
10
10
|
export interface StudentGeometryChangeMeta {
|
|
11
11
|
action: StudentGeometryAction;
|
|
12
12
|
entityIds: string[];
|
|
@@ -6,7 +6,7 @@ import { GeometryState } from '../schemas/geometryState.schema.js';
|
|
|
6
6
|
* may grow additively, so a consumer treats a value it does not know as a
|
|
7
7
|
* generic change.
|
|
8
8
|
*/
|
|
9
|
-
export type StudentGeometryAction = 'point-placed' | 'point-promoted' | 'segment-created' | 'line-created' | 'point-moved' | 'deleted' | 'undo' | 'redo' | 'reset' | 'revealed';
|
|
9
|
+
export type StudentGeometryAction = 'point-placed' | 'point-promoted' | 'segment-created' | 'line-created' | 'angle-created' | 'point-moved' | 'deleted' | 'undo' | 'redo' | 'reset' | 'revealed';
|
|
10
10
|
export interface StudentGeometryChangeMeta {
|
|
11
11
|
action: StudentGeometryAction;
|
|
12
12
|
entityIds: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attemptChange.d.ts","sourceRoot":"","sources":["../../src/store/attemptChange.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,SAAS,GACT,MAAM,GACN,MAAM,GACN,OAAO,GACP,UAAU,CAAA;AAEd,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,qBAAqB,CAAA;IAI7B,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,2BAA4B,SAAQ,yBAAyB;IAC5E,QAAQ,EAAE,MAAM,CAAA;CACjB;AAMD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAYxD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,QAAQ,EAAE,CAexF"}
|
|
1
|
+
{"version":3,"file":"attemptChange.d.ts","sourceRoot":"","sources":["../../src/store/attemptChange.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAEpE;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,eAAe,GACf,aAAa,GACb,SAAS,GACT,MAAM,GACN,MAAM,GACN,OAAO,GACP,UAAU,CAAA;AAEd,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,qBAAqB,CAAA;IAI7B,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,2BAA4B,SAAQ,yBAAyB;IAC5E,QAAQ,EAAE,MAAM,CAAA;CACjB;AAMD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAYxD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,QAAQ,EAAE,CAexF"}
|
|
@@ -16,11 +16,23 @@ export type ConstructionEndpoint = {
|
|
|
16
16
|
kind: 'create';
|
|
17
17
|
origin: PointDefinition;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* One completed construction gesture. Every member has `from` and `to`; an
|
|
21
|
+
* angle adds its `vertex` between them, in notation order — ∠ABC is
|
|
22
|
+
* `{ from: A, vertex: B, to: C }` (ADR 0009 § Amendment — the angle
|
|
23
|
+
* construction command).
|
|
24
|
+
*/
|
|
25
|
+
export type ConstructionCommand = {
|
|
20
26
|
tool: 'segment' | 'line';
|
|
21
27
|
from: ConstructionEndpoint;
|
|
22
28
|
to: ConstructionEndpoint;
|
|
23
|
-
}
|
|
29
|
+
} | {
|
|
30
|
+
tool: 'angle';
|
|
31
|
+
from: ConstructionEndpoint;
|
|
32
|
+
vertex: ConstructionEndpoint;
|
|
33
|
+
to: ConstructionEndpoint;
|
|
34
|
+
};
|
|
35
|
+
export declare function endpointsOf(command: ConstructionCommand): ConstructionEndpoint[];
|
|
24
36
|
/**
|
|
25
37
|
* Why the last construction attempt made nothing new: the document already
|
|
26
38
|
* declares that construction, as `entityId` (RFC 0004 § Decision 1). A code
|
|
@@ -16,11 +16,23 @@ export type ConstructionEndpoint = {
|
|
|
16
16
|
kind: 'create';
|
|
17
17
|
origin: PointDefinition;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* One completed construction gesture. Every member has `from` and `to`; an
|
|
21
|
+
* angle adds its `vertex` between them, in notation order — ∠ABC is
|
|
22
|
+
* `{ from: A, vertex: B, to: C }` (ADR 0009 § Amendment — the angle
|
|
23
|
+
* construction command).
|
|
24
|
+
*/
|
|
25
|
+
export type ConstructionCommand = {
|
|
20
26
|
tool: 'segment' | 'line';
|
|
21
27
|
from: ConstructionEndpoint;
|
|
22
28
|
to: ConstructionEndpoint;
|
|
23
|
-
}
|
|
29
|
+
} | {
|
|
30
|
+
tool: 'angle';
|
|
31
|
+
from: ConstructionEndpoint;
|
|
32
|
+
vertex: ConstructionEndpoint;
|
|
33
|
+
to: ConstructionEndpoint;
|
|
34
|
+
};
|
|
35
|
+
export declare function endpointsOf(command: ConstructionCommand): ConstructionEndpoint[];
|
|
24
36
|
/**
|
|
25
37
|
* Why the last construction attempt made nothing new: the document already
|
|
26
38
|
* declares that construction, as `entityId` (RFC 0004 § Decision 1). A code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructionCommand.d.ts","sourceRoot":"","sources":["../../src/store/constructionCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEhD;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAE,GAIjC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAA;AAE/C,MAAM,
|
|
1
|
+
{"version":3,"file":"constructionCommand.d.ts","sourceRoot":"","sources":["../../src/store/constructionCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEhD;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAE,GAIjC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAA;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IAAC,IAAI,EAAE,oBAAoB,CAAC;IAAC,EAAE,EAAE,oBAAoB,CAAA;CAAE,GAClF;IACE,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,oBAAoB,CAAA;IAC1B,MAAM,EAAE,oBAAoB,CAAA;IAC5B,EAAE,EAAE,oBAAoB,CAAA;CACzB,CAAA;AAIL,wBAAgB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,oBAAoB,EAAE,CAIhF;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,wBAAwB,CAAA;IAC9B,QAAQ,EAAE,QAAQ,CAAA;CACnB"}
|
|
@@ -17,5 +17,14 @@ export declare function findSameConstruction(entities: EntityRecord, candidate:
|
|
|
17
17
|
* record order. Both ends in one pass, because a gesture asks for both at once.
|
|
18
18
|
*/
|
|
19
19
|
export declare function findEndpointsInScene(endpoints: readonly ConstructionEndpoint[], givens: EntityRecord, attempt?: EntityRecord): (PointId | null)[];
|
|
20
|
+
/**
|
|
21
|
+
* Whether two ends of one command land on the same point once resolved: an id
|
|
22
|
+
* named twice, a `create` end that reuses an `existing` one, two ends reusing
|
|
23
|
+
* one point, or two `create` ends with the same origin — which would otherwise
|
|
24
|
+
* invent twins. `reused` is `findEndpointsInScene()`'s answer. A construction
|
|
25
|
+
* whose ends coincide is degenerate, and an angle document refuses a repeated
|
|
26
|
+
* parent.
|
|
27
|
+
*/
|
|
28
|
+
export declare function endsRepeat(endpoints: readonly ConstructionEndpoint[], reused: readonly (PointId | null)[]): boolean;
|
|
20
29
|
export declare function duplicateOf(entityId: EntityId): ConstructionNotice;
|
|
21
30
|
export {};
|
|
@@ -17,6 +17,15 @@ export declare function findSameConstruction(entities: EntityRecord, candidate:
|
|
|
17
17
|
* record order. Both ends in one pass, because a gesture asks for both at once.
|
|
18
18
|
*/
|
|
19
19
|
export declare function findEndpointsInScene(endpoints: readonly ConstructionEndpoint[], givens: EntityRecord, attempt?: EntityRecord): (PointId | null)[];
|
|
20
|
+
/**
|
|
21
|
+
* Whether two ends of one command land on the same point once resolved: an id
|
|
22
|
+
* named twice, a `create` end that reuses an `existing` one, two ends reusing
|
|
23
|
+
* one point, or two `create` ends with the same origin — which would otherwise
|
|
24
|
+
* invent twins. `reused` is `findEndpointsInScene()`'s answer. A construction
|
|
25
|
+
* whose ends coincide is degenerate, and an angle document refuses a repeated
|
|
26
|
+
* parent.
|
|
27
|
+
*/
|
|
28
|
+
export declare function endsRepeat(endpoints: readonly ConstructionEndpoint[], reused: readonly (PointId | null)[]): boolean;
|
|
20
29
|
export declare function duplicateOf(entityId: EntityId): ConstructionNotice;
|
|
21
30
|
export {};
|
|
22
31
|
//# sourceMappingURL=constructionIdentity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructionIdentity.d.ts","sourceRoot":"","sources":["../../src/store/constructionIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACzE,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OG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,SAAS,oBAAoB,EAAE,EAC1C,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE,YAAiB,GACzB,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CA+BpB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,SAAS,oBAAoB,EAAE,EAC1C,MAAM,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,GAClC,OAAO,CAST;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,kBAAkB,CAElE"}
|
|
@@ -14,6 +14,7 @@ export interface StudentState {
|
|
|
14
14
|
geometry: GeometryState;
|
|
15
15
|
pendingObjectType: ObjectTypeName | null;
|
|
16
16
|
pendingFirstPointId: PointId | null;
|
|
17
|
+
pendingVertexPointId: PointId | null;
|
|
17
18
|
selectedObjectId: string | null;
|
|
18
19
|
past: GeometryState[];
|
|
19
20
|
future: GeometryState[];
|
|
@@ -132,6 +133,12 @@ export declare function endStudentPointDrag(store: Store<StudentState>): void;
|
|
|
132
133
|
* that is there.
|
|
133
134
|
*/
|
|
134
135
|
export declare function executeConstruction(store: Store<StudentState>, command: ConstructionCommand): void;
|
|
136
|
+
/**
|
|
137
|
+
* One tap of a click-click construction on an existing point. A segment or a
|
|
138
|
+
* line builds on its second pick; an angle keeps its second as the vertex and
|
|
139
|
+
* builds on its third, in notation order (ADR 0009 § Amendment). A tap on a
|
|
140
|
+
* point already picked cancels the whole sequence.
|
|
141
|
+
*/
|
|
135
142
|
export declare function pickStudentPoint(store: Store<StudentState>, pointId: PointId): void;
|
|
136
143
|
export declare function selectStudentObject(store: Store<StudentState>, id: string | null): void;
|
|
137
144
|
export declare function isStudentOwned(state: StudentState, id: string): boolean;
|
|
@@ -14,6 +14,7 @@ export interface StudentState {
|
|
|
14
14
|
geometry: GeometryState;
|
|
15
15
|
pendingObjectType: ObjectTypeName | null;
|
|
16
16
|
pendingFirstPointId: PointId | null;
|
|
17
|
+
pendingVertexPointId: PointId | null;
|
|
17
18
|
selectedObjectId: string | null;
|
|
18
19
|
past: GeometryState[];
|
|
19
20
|
future: GeometryState[];
|
|
@@ -132,6 +133,12 @@ export declare function endStudentPointDrag(store: Store<StudentState>): void;
|
|
|
132
133
|
* that is there.
|
|
133
134
|
*/
|
|
134
135
|
export declare function executeConstruction(store: Store<StudentState>, command: ConstructionCommand): void;
|
|
136
|
+
/**
|
|
137
|
+
* One tap of a click-click construction on an existing point. A segment or a
|
|
138
|
+
* line builds on its second pick; an angle keeps its second as the vertex and
|
|
139
|
+
* builds on its third, in notation order (ADR 0009 § Amendment). A tap on a
|
|
140
|
+
* point already picked cancels the whole sequence.
|
|
141
|
+
*/
|
|
135
142
|
export declare function pickStudentPoint(store: Store<StudentState>, pointId: PointId): void;
|
|
136
143
|
export declare function selectStudentObject(store: Store<StudentState>, id: string | null): void;
|
|
137
144
|
export declare function isStudentOwned(state: StudentState, id: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studentStore.d.ts","sourceRoot":"","sources":["../../src/store/studentStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"studentStore.d.ts","sourceRoot":"","sources":["../../src/store/studentStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAGlE,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAChG,OAAO,KAAK,EAIV,eAAe,EAChB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAMvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;A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,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CA2CjG;AAID,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAWtF;AASD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAIpE;AAyBD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,EAC1B,OAAO,EAAE,mBAAmB,GAC3B,IAAI,CAqCN;AAiED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CA6BnF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAEvF;AAID,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAGvE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,oBAAoB,CAiB7F;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAiDhF;AAsED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAYhG"}
|
|
@@ -10,6 +10,7 @@ export interface TeacherEditorState {
|
|
|
10
10
|
exercise: GeometryExercise;
|
|
11
11
|
pendingObjectType: ObjectTypeName | null;
|
|
12
12
|
pendingFirstPointId: PointId | null;
|
|
13
|
+
pendingVertexPointId: PointId | null;
|
|
13
14
|
selectedGivenId: string | null;
|
|
14
15
|
past: GeometryExercise[];
|
|
15
16
|
future: GeometryExercise[];
|
|
@@ -96,6 +97,15 @@ export declare function setGivenPointDraggable(store: Store<TeacherEditorState>,
|
|
|
96
97
|
* teacher means to undo on its own.
|
|
97
98
|
*/
|
|
98
99
|
export declare function setGivenLabel(store: Store<TeacherEditorState>, id: EntityId, label: string): void;
|
|
100
|
+
/**
|
|
101
|
+
* Shows or hides a given angle's measure beside its mark (M3.5.a), the
|
|
102
|
+
* `measureLabel` entry ADR 0010 § 4 defines. Absent means hidden, so hiding
|
|
103
|
+
* removes the field rather than storing a second spelling of "none".
|
|
104
|
+
*
|
|
105
|
+
* Refused for anything but an angle — `entityDocumentIssues()` rejects a
|
|
106
|
+
* `measureLabel` on any other kind — and one undo entry per toggle.
|
|
107
|
+
*/
|
|
108
|
+
export declare function setGivenMeasureLabel(store: Store<TeacherEditorState>, id: EntityId, shown: boolean): void;
|
|
99
109
|
export declare function getGivenRemovalImpact(exercise: GeometryExercise, id: string): GivenRemovalImpact;
|
|
100
110
|
export declare function removeGiven(store: Store<TeacherEditorState>, id: string): void;
|
|
101
111
|
export declare function addGivenSegment(store: Store<TeacherEditorState>, fromId: PointId, toId: PointId): string | null;
|
|
@@ -108,4 +118,10 @@ export declare function selectPendingObjectType(store: Store<TeacherEditorState>
|
|
|
108
118
|
* gesture.
|
|
109
119
|
*/
|
|
110
120
|
export declare function cancelGivenConstruction(store: Store<TeacherEditorState>): void;
|
|
121
|
+
/**
|
|
122
|
+
* One tap of a click-click construction on an existing point. A segment or a
|
|
123
|
+
* line builds on its second pick; an angle keeps its second as the vertex and
|
|
124
|
+
* builds on its third, in notation order (ADR 0009 § Amendment). A tap on a
|
|
125
|
+
* point already picked cancels the whole sequence.
|
|
126
|
+
*/
|
|
111
127
|
export declare function pickPointForPendingObject(store: Store<TeacherEditorState>, pointId: PointId): void;
|