@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
|
@@ -6,7 +6,7 @@ export declare const toolNameSchema: z.ZodEnum<{
|
|
|
6
6
|
protractor: "protractor";
|
|
7
7
|
}>;
|
|
8
8
|
export type ToolName = z.infer<typeof toolNameSchema>;
|
|
9
|
-
export declare const latestGeometryExerciseVersion =
|
|
9
|
+
export declare const latestGeometryExerciseVersion = 5;
|
|
10
10
|
export declare const extraObjectPolicySchema: z.ZodEnum<{
|
|
11
11
|
allow: "allow";
|
|
12
12
|
reject: "reject";
|
|
@@ -20,7 +20,7 @@ export declare const exerciseGradingSchema: z.ZodObject<{
|
|
|
20
20
|
}, z.core.$strict>;
|
|
21
21
|
export type ExerciseGrading = z.infer<typeof exerciseGradingSchema>;
|
|
22
22
|
export declare const geometryExerciseSchema: z.ZodObject<{
|
|
23
|
-
schemaVersion: z.ZodLiteral<
|
|
23
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
24
24
|
id: z.ZodString;
|
|
25
25
|
viewport: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
26
26
|
showGrid: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -47,6 +47,9 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
47
47
|
} | {
|
|
48
48
|
kind: "circle";
|
|
49
49
|
parents: readonly [string, string];
|
|
50
|
+
} | {
|
|
51
|
+
kind: "angle";
|
|
52
|
+
parents: readonly [string, string, string];
|
|
50
53
|
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
51
54
|
kind: "point";
|
|
52
55
|
at: {
|
|
@@ -70,13 +73,18 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
70
73
|
} | {
|
|
71
74
|
kind: "circle";
|
|
72
75
|
parents: readonly [string, string];
|
|
76
|
+
} | {
|
|
77
|
+
kind: "angle";
|
|
78
|
+
parents: readonly [string, string, string];
|
|
73
79
|
}>, unknown>>;
|
|
74
80
|
presentation: z.ZodType<Record<string, {
|
|
75
81
|
role: "implicit" | "explicit";
|
|
76
82
|
label?: string | undefined;
|
|
83
|
+
measureLabel?: "degrees" | undefined;
|
|
77
84
|
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
78
85
|
role: "implicit" | "explicit";
|
|
79
86
|
label?: string | undefined;
|
|
87
|
+
measureLabel?: "degrees" | undefined;
|
|
80
88
|
}>, unknown>>;
|
|
81
89
|
draggableEntityIds: z.ZodArray<z.ZodString>;
|
|
82
90
|
allowedObjects: z.ZodArray<z.ZodEnum<{
|
|
@@ -84,6 +92,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
84
92
|
segment: "segment";
|
|
85
93
|
line: "line";
|
|
86
94
|
circle: "circle";
|
|
95
|
+
angle: "angle";
|
|
87
96
|
}>>;
|
|
88
97
|
tools: z.ZodArray<z.ZodEnum<{
|
|
89
98
|
ruler: "ruler";
|
|
@@ -98,6 +107,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
98
107
|
segment: "segment";
|
|
99
108
|
line: "line";
|
|
100
109
|
circle: "circle";
|
|
110
|
+
angle: "angle";
|
|
101
111
|
}>;
|
|
102
112
|
}, z.core.$strict>, z.ZodObject<{
|
|
103
113
|
id: z.ZodString;
|
|
@@ -107,6 +117,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
107
117
|
segment: "segment";
|
|
108
118
|
line: "line";
|
|
109
119
|
circle: "circle";
|
|
120
|
+
angle: "angle";
|
|
110
121
|
}>;
|
|
111
122
|
pointIds: z.ZodArray<z.ZodString>;
|
|
112
123
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -117,6 +128,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
117
128
|
segment: "segment";
|
|
118
129
|
line: "line";
|
|
119
130
|
circle: "circle";
|
|
131
|
+
angle: "angle";
|
|
120
132
|
}>;
|
|
121
133
|
referenceObjectId: z.ZodString;
|
|
122
134
|
throughPointId: z.ZodString;
|
|
@@ -129,6 +141,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
129
141
|
segment: "segment";
|
|
130
142
|
line: "line";
|
|
131
143
|
circle: "circle";
|
|
144
|
+
angle: "angle";
|
|
132
145
|
}>;
|
|
133
146
|
referenceObjectId: z.ZodString;
|
|
134
147
|
throughPointId: z.ZodString;
|
|
@@ -145,6 +158,63 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
145
158
|
objectType: z.ZodLiteral<"point">;
|
|
146
159
|
referenceObjectId: z.ZodString;
|
|
147
160
|
toleranceUnits: z.ZodNumber;
|
|
161
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
162
|
+
id: z.ZodString;
|
|
163
|
+
type: z.ZodLiteral<"angleMeasure">;
|
|
164
|
+
objectType: z.ZodLiteral<"angle">;
|
|
165
|
+
vertexPointId: z.ZodString;
|
|
166
|
+
interpretation: z.ZodEnum<{
|
|
167
|
+
directed: "directed";
|
|
168
|
+
undirected: "undirected";
|
|
169
|
+
}>;
|
|
170
|
+
criterion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
171
|
+
kind: z.ZodLiteral<"degrees">;
|
|
172
|
+
targetDegrees: z.ZodNumber;
|
|
173
|
+
toleranceDegrees: z.ZodNumber;
|
|
174
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
175
|
+
kind: z.ZodLiteral<"type">;
|
|
176
|
+
angleType: z.ZodEnum<{
|
|
177
|
+
acute: "acute";
|
|
178
|
+
right: "right";
|
|
179
|
+
obtuse: "obtuse";
|
|
180
|
+
straight: "straight";
|
|
181
|
+
reflex: "reflex";
|
|
182
|
+
}>;
|
|
183
|
+
}, z.core.$strict>], "kind">;
|
|
184
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
185
|
+
id: z.ZodString;
|
|
186
|
+
type: z.ZodLiteral<"angleBisector">;
|
|
187
|
+
objectType: z.ZodEnum<{
|
|
188
|
+
point: "point";
|
|
189
|
+
segment: "segment";
|
|
190
|
+
line: "line";
|
|
191
|
+
circle: "circle";
|
|
192
|
+
angle: "angle";
|
|
193
|
+
}>;
|
|
194
|
+
referenceAngleId: z.ZodString;
|
|
195
|
+
toleranceDegrees: z.ZodNumber;
|
|
196
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
type: z.ZodLiteral<"givenAngle">;
|
|
199
|
+
angleId: z.ZodString;
|
|
200
|
+
interpretation: z.ZodEnum<{
|
|
201
|
+
directed: "directed";
|
|
202
|
+
undirected: "undirected";
|
|
203
|
+
}>;
|
|
204
|
+
criterion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
205
|
+
kind: z.ZodLiteral<"degrees">;
|
|
206
|
+
targetDegrees: z.ZodNumber;
|
|
207
|
+
toleranceDegrees: z.ZodNumber;
|
|
208
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
209
|
+
kind: z.ZodLiteral<"type">;
|
|
210
|
+
angleType: z.ZodEnum<{
|
|
211
|
+
acute: "acute";
|
|
212
|
+
right: "right";
|
|
213
|
+
obtuse: "obtuse";
|
|
214
|
+
straight: "straight";
|
|
215
|
+
reflex: "reflex";
|
|
216
|
+
}>;
|
|
217
|
+
}, z.core.$strict>], "kind">;
|
|
148
218
|
}, z.core.$strict>], "type">>;
|
|
149
219
|
grading: z.ZodOptional<z.ZodObject<{
|
|
150
220
|
extraObjects: z.ZodEnum<{
|
|
@@ -177,6 +247,9 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
177
247
|
} | {
|
|
178
248
|
kind: "circle";
|
|
179
249
|
parents: readonly [string, string];
|
|
250
|
+
} | {
|
|
251
|
+
kind: "angle";
|
|
252
|
+
parents: readonly [string, string, string];
|
|
180
253
|
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
181
254
|
kind: "point";
|
|
182
255
|
at: {
|
|
@@ -200,13 +273,18 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
200
273
|
} | {
|
|
201
274
|
kind: "circle";
|
|
202
275
|
parents: readonly [string, string];
|
|
276
|
+
} | {
|
|
277
|
+
kind: "angle";
|
|
278
|
+
parents: readonly [string, string, string];
|
|
203
279
|
}>, unknown>>;
|
|
204
280
|
presentation: z.ZodType<Record<string, {
|
|
205
281
|
role: "implicit" | "explicit";
|
|
206
282
|
label?: string | undefined;
|
|
283
|
+
measureLabel?: "degrees" | undefined;
|
|
207
284
|
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
208
285
|
role: "implicit" | "explicit";
|
|
209
286
|
label?: string | undefined;
|
|
287
|
+
measureLabel?: "degrees" | undefined;
|
|
210
288
|
}>, unknown>>;
|
|
211
289
|
answerEntityIds: z.ZodArray<z.ZodString>;
|
|
212
290
|
}, z.core.$strict>>;
|
|
@@ -6,7 +6,7 @@ export declare const toolNameSchema: z.ZodEnum<{
|
|
|
6
6
|
protractor: "protractor";
|
|
7
7
|
}>;
|
|
8
8
|
export type ToolName = z.infer<typeof toolNameSchema>;
|
|
9
|
-
export declare const latestGeometryExerciseVersion =
|
|
9
|
+
export declare const latestGeometryExerciseVersion = 5;
|
|
10
10
|
export declare const extraObjectPolicySchema: z.ZodEnum<{
|
|
11
11
|
allow: "allow";
|
|
12
12
|
reject: "reject";
|
|
@@ -20,7 +20,7 @@ export declare const exerciseGradingSchema: z.ZodObject<{
|
|
|
20
20
|
}, z.core.$strict>;
|
|
21
21
|
export type ExerciseGrading = z.infer<typeof exerciseGradingSchema>;
|
|
22
22
|
export declare const geometryExerciseSchema: z.ZodObject<{
|
|
23
|
-
schemaVersion: z.ZodLiteral<
|
|
23
|
+
schemaVersion: z.ZodLiteral<5>;
|
|
24
24
|
id: z.ZodString;
|
|
25
25
|
viewport: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
26
26
|
showGrid: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -47,6 +47,9 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
47
47
|
} | {
|
|
48
48
|
kind: "circle";
|
|
49
49
|
parents: readonly [string, string];
|
|
50
|
+
} | {
|
|
51
|
+
kind: "angle";
|
|
52
|
+
parents: readonly [string, string, string];
|
|
50
53
|
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
51
54
|
kind: "point";
|
|
52
55
|
at: {
|
|
@@ -70,13 +73,18 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
70
73
|
} | {
|
|
71
74
|
kind: "circle";
|
|
72
75
|
parents: readonly [string, string];
|
|
76
|
+
} | {
|
|
77
|
+
kind: "angle";
|
|
78
|
+
parents: readonly [string, string, string];
|
|
73
79
|
}>, unknown>>;
|
|
74
80
|
presentation: z.ZodType<Record<string, {
|
|
75
81
|
role: "implicit" | "explicit";
|
|
76
82
|
label?: string | undefined;
|
|
83
|
+
measureLabel?: "degrees" | undefined;
|
|
77
84
|
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
78
85
|
role: "implicit" | "explicit";
|
|
79
86
|
label?: string | undefined;
|
|
87
|
+
measureLabel?: "degrees" | undefined;
|
|
80
88
|
}>, unknown>>;
|
|
81
89
|
draggableEntityIds: z.ZodArray<z.ZodString>;
|
|
82
90
|
allowedObjects: z.ZodArray<z.ZodEnum<{
|
|
@@ -84,6 +92,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
84
92
|
segment: "segment";
|
|
85
93
|
line: "line";
|
|
86
94
|
circle: "circle";
|
|
95
|
+
angle: "angle";
|
|
87
96
|
}>>;
|
|
88
97
|
tools: z.ZodArray<z.ZodEnum<{
|
|
89
98
|
ruler: "ruler";
|
|
@@ -98,6 +107,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
98
107
|
segment: "segment";
|
|
99
108
|
line: "line";
|
|
100
109
|
circle: "circle";
|
|
110
|
+
angle: "angle";
|
|
101
111
|
}>;
|
|
102
112
|
}, z.core.$strict>, z.ZodObject<{
|
|
103
113
|
id: z.ZodString;
|
|
@@ -107,6 +117,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
107
117
|
segment: "segment";
|
|
108
118
|
line: "line";
|
|
109
119
|
circle: "circle";
|
|
120
|
+
angle: "angle";
|
|
110
121
|
}>;
|
|
111
122
|
pointIds: z.ZodArray<z.ZodString>;
|
|
112
123
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -117,6 +128,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
117
128
|
segment: "segment";
|
|
118
129
|
line: "line";
|
|
119
130
|
circle: "circle";
|
|
131
|
+
angle: "angle";
|
|
120
132
|
}>;
|
|
121
133
|
referenceObjectId: z.ZodString;
|
|
122
134
|
throughPointId: z.ZodString;
|
|
@@ -129,6 +141,7 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
129
141
|
segment: "segment";
|
|
130
142
|
line: "line";
|
|
131
143
|
circle: "circle";
|
|
144
|
+
angle: "angle";
|
|
132
145
|
}>;
|
|
133
146
|
referenceObjectId: z.ZodString;
|
|
134
147
|
throughPointId: z.ZodString;
|
|
@@ -145,6 +158,63 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
145
158
|
objectType: z.ZodLiteral<"point">;
|
|
146
159
|
referenceObjectId: z.ZodString;
|
|
147
160
|
toleranceUnits: z.ZodNumber;
|
|
161
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
162
|
+
id: z.ZodString;
|
|
163
|
+
type: z.ZodLiteral<"angleMeasure">;
|
|
164
|
+
objectType: z.ZodLiteral<"angle">;
|
|
165
|
+
vertexPointId: z.ZodString;
|
|
166
|
+
interpretation: z.ZodEnum<{
|
|
167
|
+
directed: "directed";
|
|
168
|
+
undirected: "undirected";
|
|
169
|
+
}>;
|
|
170
|
+
criterion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
171
|
+
kind: z.ZodLiteral<"degrees">;
|
|
172
|
+
targetDegrees: z.ZodNumber;
|
|
173
|
+
toleranceDegrees: z.ZodNumber;
|
|
174
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
175
|
+
kind: z.ZodLiteral<"type">;
|
|
176
|
+
angleType: z.ZodEnum<{
|
|
177
|
+
acute: "acute";
|
|
178
|
+
right: "right";
|
|
179
|
+
obtuse: "obtuse";
|
|
180
|
+
straight: "straight";
|
|
181
|
+
reflex: "reflex";
|
|
182
|
+
}>;
|
|
183
|
+
}, z.core.$strict>], "kind">;
|
|
184
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
185
|
+
id: z.ZodString;
|
|
186
|
+
type: z.ZodLiteral<"angleBisector">;
|
|
187
|
+
objectType: z.ZodEnum<{
|
|
188
|
+
point: "point";
|
|
189
|
+
segment: "segment";
|
|
190
|
+
line: "line";
|
|
191
|
+
circle: "circle";
|
|
192
|
+
angle: "angle";
|
|
193
|
+
}>;
|
|
194
|
+
referenceAngleId: z.ZodString;
|
|
195
|
+
toleranceDegrees: z.ZodNumber;
|
|
196
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
type: z.ZodLiteral<"givenAngle">;
|
|
199
|
+
angleId: z.ZodString;
|
|
200
|
+
interpretation: z.ZodEnum<{
|
|
201
|
+
directed: "directed";
|
|
202
|
+
undirected: "undirected";
|
|
203
|
+
}>;
|
|
204
|
+
criterion: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
205
|
+
kind: z.ZodLiteral<"degrees">;
|
|
206
|
+
targetDegrees: z.ZodNumber;
|
|
207
|
+
toleranceDegrees: z.ZodNumber;
|
|
208
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
209
|
+
kind: z.ZodLiteral<"type">;
|
|
210
|
+
angleType: z.ZodEnum<{
|
|
211
|
+
acute: "acute";
|
|
212
|
+
right: "right";
|
|
213
|
+
obtuse: "obtuse";
|
|
214
|
+
straight: "straight";
|
|
215
|
+
reflex: "reflex";
|
|
216
|
+
}>;
|
|
217
|
+
}, z.core.$strict>], "kind">;
|
|
148
218
|
}, z.core.$strict>], "type">>;
|
|
149
219
|
grading: z.ZodOptional<z.ZodObject<{
|
|
150
220
|
extraObjects: z.ZodEnum<{
|
|
@@ -177,6 +247,9 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
177
247
|
} | {
|
|
178
248
|
kind: "circle";
|
|
179
249
|
parents: readonly [string, string];
|
|
250
|
+
} | {
|
|
251
|
+
kind: "angle";
|
|
252
|
+
parents: readonly [string, string, string];
|
|
180
253
|
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
181
254
|
kind: "point";
|
|
182
255
|
at: {
|
|
@@ -200,13 +273,18 @@ export declare const geometryExerciseSchema: z.ZodObject<{
|
|
|
200
273
|
} | {
|
|
201
274
|
kind: "circle";
|
|
202
275
|
parents: readonly [string, string];
|
|
276
|
+
} | {
|
|
277
|
+
kind: "angle";
|
|
278
|
+
parents: readonly [string, string, string];
|
|
203
279
|
}>, unknown>>;
|
|
204
280
|
presentation: z.ZodType<Record<string, {
|
|
205
281
|
role: "implicit" | "explicit";
|
|
206
282
|
label?: string | undefined;
|
|
283
|
+
measureLabel?: "degrees" | undefined;
|
|
207
284
|
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
208
285
|
role: "implicit" | "explicit";
|
|
209
286
|
label?: string | undefined;
|
|
287
|
+
measureLabel?: "degrees" | undefined;
|
|
210
288
|
}>, unknown>>;
|
|
211
289
|
answerEntityIds: z.ZodArray<z.ZodString>;
|
|
212
290
|
}, z.core.$strict>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/exercise.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"exercise.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/exercise.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAevB,OAAO,EAAmB,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAA;AAQtF,eAAO,MAAM,cAAc;;;;EAA+C,CAAA;AAC1E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAmBrD,eAAO,MAAM,6BAA6B,IAAI,CAAA;AAM9C,eAAO,MAAM,uBAAuB;;;EAA8B,CAAA;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAKvE,eAAO,MAAM,qBAAqB;;;;;kBAA+D,CAAA;AACjG,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAgBnE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkE/B,CAAA;AAEJ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AASrE,eAAO,MAAM,0BAA0B,EAAE,SAAS,aAAa,EAK9D,CAAA;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAEtE;AAKD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAExE"}
|
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const v2ExerciseSchemaVersion = 2;
|
|
3
|
+
/**
|
|
4
|
+
* The exercise document ADR 0008 froze, transcribed **whole** so the v2 → v3
|
|
5
|
+
* step can check what it was handed before promoting it (ADR 0013).
|
|
6
|
+
*
|
|
7
|
+
* Frozen means frozen: nothing below is imported from the current vocabulary.
|
|
8
|
+
* An earlier version of this file reused `entityDefinitionSchema`,
|
|
9
|
+
* `entityPresentationSchema`, `objectTypeNameSchema`, `toolNameSchema` and
|
|
10
|
+
* `geometryGoalSchema`, which would have silently admitted every later addition
|
|
11
|
+
* to them — the `angle` entity kind, `angleMeasure` / `angleBisector` goals and
|
|
12
|
+
* the `measureLabel` presentation entry ADR 0010 already plans — into a document
|
|
13
|
+
* claiming to be version 2. A union member or an enum value is as much a version
|
|
14
|
+
* change as a new field, and a shared schema cannot tell two versions apart.
|
|
15
|
+
*
|
|
16
|
+
* What is deliberately shared is machinery rather than vocabulary:
|
|
17
|
+
* `entityRecordSchema()` supplies the `__proto__` refusal (M2.G.1) and the
|
|
18
|
+
* record's id-key rule. If those change they change for every version at once,
|
|
19
|
+
* which is a decision of its own rather than a new document feature.
|
|
20
|
+
*
|
|
21
|
+
* Two things this schema is not. It carries **no cross-reference refinements**:
|
|
22
|
+
* it answers "could version 2 have said this?", never "is this exercise
|
|
23
|
+
* coherent?" — the migrated document is parsed by `geometryExerciseSchema`,
|
|
24
|
+
* whose refinements report a dangling id or a duplicate goal id at its real
|
|
25
|
+
* path. And it carries **no issue messages**: nothing renders them, because
|
|
26
|
+
* `v2ToV3.ts` reports the offending *paths* and the surviving document is
|
|
27
|
+
* described by the current schema.
|
|
28
|
+
*
|
|
29
|
+
* `tests/schemas/v2ToV3.test.ts` § "the frozen v2 vocabulary" fails the day the
|
|
30
|
+
* current schemas gain a kind, goal, object type, tool or presentation field
|
|
31
|
+
* this file does not list, so the freeze cannot rot quietly.
|
|
32
|
+
*/
|
|
33
|
+
/** v2's id rule, shared with the later frozen transcriptions built on this one. */
|
|
34
|
+
export declare const v2IdSchema: z.ZodString;
|
|
3
35
|
/** v2's four entity kinds, its object types, its tools and its goal types. */
|
|
4
36
|
export declare const v2EntityKinds: readonly ["point", "segment", "line", "circle"];
|
|
5
37
|
export declare const v2ObjectTypeNames: readonly ["point", "segment", "line", "circle"];
|
|
@@ -7,6 +39,31 @@ export declare const v2ToolNames: readonly ["ruler", "setSquare", "protractor"];
|
|
|
7
39
|
export declare const v2GoalTypes: readonly ["create", "throughPoints", "perpendicular", "parallel", "segmentLength", "midpoint"];
|
|
8
40
|
/** And the only two keys a v2 presentation entry had. */
|
|
9
41
|
export declare const v2PresentationKeys: readonly ["role", "label"];
|
|
42
|
+
/** v2's entity definitions, for the later frozen transcriptions to widen by name. */
|
|
43
|
+
export declare const v2EntityDefinitionMembers: readonly [z.ZodObject<{
|
|
44
|
+
kind: z.ZodLiteral<"point">;
|
|
45
|
+
at: z.ZodObject<{
|
|
46
|
+
x: z.ZodNumber;
|
|
47
|
+
y: z.ZodNumber;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
50
|
+
kind: z.ZodLiteral<"point">;
|
|
51
|
+
on: z.ZodString;
|
|
52
|
+
t: z.ZodNumber;
|
|
53
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"point">;
|
|
55
|
+
intersectionOf: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
56
|
+
which: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
57
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
58
|
+
kind: z.ZodLiteral<"segment">;
|
|
59
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"line">;
|
|
62
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"circle">;
|
|
65
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
66
|
+
}, z.core.$strict>];
|
|
10
67
|
export declare const geometryExerciseV2Schema: z.ZodObject<{
|
|
11
68
|
schemaVersion: z.ZodLiteral<2>;
|
|
12
69
|
id: z.ZodString;
|
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const v2ExerciseSchemaVersion = 2;
|
|
3
|
+
/**
|
|
4
|
+
* The exercise document ADR 0008 froze, transcribed **whole** so the v2 → v3
|
|
5
|
+
* step can check what it was handed before promoting it (ADR 0013).
|
|
6
|
+
*
|
|
7
|
+
* Frozen means frozen: nothing below is imported from the current vocabulary.
|
|
8
|
+
* An earlier version of this file reused `entityDefinitionSchema`,
|
|
9
|
+
* `entityPresentationSchema`, `objectTypeNameSchema`, `toolNameSchema` and
|
|
10
|
+
* `geometryGoalSchema`, which would have silently admitted every later addition
|
|
11
|
+
* to them — the `angle` entity kind, `angleMeasure` / `angleBisector` goals and
|
|
12
|
+
* the `measureLabel` presentation entry ADR 0010 already plans — into a document
|
|
13
|
+
* claiming to be version 2. A union member or an enum value is as much a version
|
|
14
|
+
* change as a new field, and a shared schema cannot tell two versions apart.
|
|
15
|
+
*
|
|
16
|
+
* What is deliberately shared is machinery rather than vocabulary:
|
|
17
|
+
* `entityRecordSchema()` supplies the `__proto__` refusal (M2.G.1) and the
|
|
18
|
+
* record's id-key rule. If those change they change for every version at once,
|
|
19
|
+
* which is a decision of its own rather than a new document feature.
|
|
20
|
+
*
|
|
21
|
+
* Two things this schema is not. It carries **no cross-reference refinements**:
|
|
22
|
+
* it answers "could version 2 have said this?", never "is this exercise
|
|
23
|
+
* coherent?" — the migrated document is parsed by `geometryExerciseSchema`,
|
|
24
|
+
* whose refinements report a dangling id or a duplicate goal id at its real
|
|
25
|
+
* path. And it carries **no issue messages**: nothing renders them, because
|
|
26
|
+
* `v2ToV3.ts` reports the offending *paths* and the surviving document is
|
|
27
|
+
* described by the current schema.
|
|
28
|
+
*
|
|
29
|
+
* `tests/schemas/v2ToV3.test.ts` § "the frozen v2 vocabulary" fails the day the
|
|
30
|
+
* current schemas gain a kind, goal, object type, tool or presentation field
|
|
31
|
+
* this file does not list, so the freeze cannot rot quietly.
|
|
32
|
+
*/
|
|
33
|
+
/** v2's id rule, shared with the later frozen transcriptions built on this one. */
|
|
34
|
+
export declare const v2IdSchema: z.ZodString;
|
|
3
35
|
/** v2's four entity kinds, its object types, its tools and its goal types. */
|
|
4
36
|
export declare const v2EntityKinds: readonly ["point", "segment", "line", "circle"];
|
|
5
37
|
export declare const v2ObjectTypeNames: readonly ["point", "segment", "line", "circle"];
|
|
@@ -7,6 +39,31 @@ export declare const v2ToolNames: readonly ["ruler", "setSquare", "protractor"];
|
|
|
7
39
|
export declare const v2GoalTypes: readonly ["create", "throughPoints", "perpendicular", "parallel", "segmentLength", "midpoint"];
|
|
8
40
|
/** And the only two keys a v2 presentation entry had. */
|
|
9
41
|
export declare const v2PresentationKeys: readonly ["role", "label"];
|
|
42
|
+
/** v2's entity definitions, for the later frozen transcriptions to widen by name. */
|
|
43
|
+
export declare const v2EntityDefinitionMembers: readonly [z.ZodObject<{
|
|
44
|
+
kind: z.ZodLiteral<"point">;
|
|
45
|
+
at: z.ZodObject<{
|
|
46
|
+
x: z.ZodNumber;
|
|
47
|
+
y: z.ZodNumber;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
50
|
+
kind: z.ZodLiteral<"point">;
|
|
51
|
+
on: z.ZodString;
|
|
52
|
+
t: z.ZodNumber;
|
|
53
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"point">;
|
|
55
|
+
intersectionOf: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
56
|
+
which: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
|
|
57
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
58
|
+
kind: z.ZodLiteral<"segment">;
|
|
59
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
60
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"line">;
|
|
62
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"circle">;
|
|
65
|
+
parents: z.ZodReadonly<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
66
|
+
}, z.core.$strict>];
|
|
10
67
|
export declare const geometryExerciseV2Schema: z.ZodObject<{
|
|
11
68
|
schemaVersion: z.ZodLiteral<2>;
|
|
12
69
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exerciseV2.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/exerciseV2.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,uBAAuB,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"exerciseV2.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/exerciseV2.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,uBAAuB,IAAI,CAAA;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,mFAAmF;AACnF,eAAO,MAAM,UAAU,aAGqB,CAAA;AAa5C,8EAA8E;AAC9E,eAAO,MAAM,aAAa,iDAAkD,CAAA;AAC5E,eAAO,MAAM,iBAAiB,iDAAkD,CAAA;AAChF,eAAO,MAAM,WAAW,+CAAgD,CAAA;AACxE,eAAO,MAAM,WAAW,gGAOd,CAAA;AACV,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,4BAA6B,CAAA;AAK5D,qFAAqF;AACrF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;mBAa5B,CAAA;AA0BV,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiB1B,CAAA"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const v4ExerciseSchemaVersion = 4;
|
|
3
|
+
/** Version 4's vocabularies: version 2's plus the angle M3.4 added (ADR 0010). */
|
|
4
|
+
export declare const v4EntityKinds: readonly ["point", "segment", "line", "circle", "angle"];
|
|
5
|
+
export declare const v4ObjectTypeNames: readonly ["point", "segment", "line", "circle", "angle"];
|
|
6
|
+
export declare const v4ToolNames: readonly ["ruler", "setSquare", "protractor"];
|
|
7
|
+
export declare const v4GoalTypes: readonly ["create", "throughPoints", "perpendicular", "parallel", "segmentLength", "midpoint"];
|
|
8
|
+
export declare const v4PresentationKeys: readonly ["role", "label", "measureLabel"];
|
|
9
|
+
/**
|
|
10
|
+
* The exercise document at version 4 as M3.4 left it, frozen by ADR 0019 so the
|
|
11
|
+
* v4 → v5 step can ask "could version 4 have said this?" once the angle goals
|
|
12
|
+
* make the current schema wider — and so the v3 → v4 step still has a version 4
|
|
13
|
+
* to ask.
|
|
14
|
+
*
|
|
15
|
+
* Version 4 is version 3 plus `solution` (ADR 0015) and the angle — one entity
|
|
16
|
+
* kind, one object type, one presentation key — and no goal type, so it is built
|
|
17
|
+
* on the frozen v3 transcription with those written out and nothing imported
|
|
18
|
+
* from the current vocabulary (see `exerciseV2.schema.ts`).
|
|
19
|
+
*
|
|
20
|
+
* `solution` is admitted and never judged. It is an attempt document that
|
|
21
|
+
* migrates and validates on its own path (ADR 0015), a malformed one does not
|
|
22
|
+
* make the exercise unloadable, and both gates that ask this schema hand it the
|
|
23
|
+
* solution-free projection anyway (ADR 0019).
|
|
24
|
+
*/
|
|
25
|
+
export declare const geometryExerciseV4Schema: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
viewport: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
28
|
+
showGrid: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
draggableEntityIds: z.ZodArray<z.ZodString>;
|
|
30
|
+
tools: z.ZodArray<z.ZodEnum<{
|
|
31
|
+
ruler: "ruler";
|
|
32
|
+
setSquare: "setSquare";
|
|
33
|
+
protractor: "protractor";
|
|
34
|
+
}>>;
|
|
35
|
+
goals: z.ZodArray<z.ZodUnion<z.ZodObject<{
|
|
36
|
+
objectType: z.ZodEnum<{
|
|
37
|
+
point: "point";
|
|
38
|
+
segment: "segment";
|
|
39
|
+
line: "line";
|
|
40
|
+
circle: "circle";
|
|
41
|
+
}>;
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
44
|
+
} | {
|
|
45
|
+
objectType: z.ZodEnum<{
|
|
46
|
+
point: "point";
|
|
47
|
+
segment: "segment";
|
|
48
|
+
line: "line";
|
|
49
|
+
circle: "circle";
|
|
50
|
+
}>;
|
|
51
|
+
pointIds: z.ZodArray<z.ZodString>;
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
54
|
+
} | {
|
|
55
|
+
objectType: z.ZodEnum<{
|
|
56
|
+
point: "point";
|
|
57
|
+
segment: "segment";
|
|
58
|
+
line: "line";
|
|
59
|
+
circle: "circle";
|
|
60
|
+
}>;
|
|
61
|
+
referenceObjectId: z.ZodString;
|
|
62
|
+
throughPointId: z.ZodString;
|
|
63
|
+
toleranceDegrees: z.ZodNumber;
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
66
|
+
} | {
|
|
67
|
+
objectType: z.ZodEnum<{
|
|
68
|
+
point: "point";
|
|
69
|
+
segment: "segment";
|
|
70
|
+
line: "line";
|
|
71
|
+
circle: "circle";
|
|
72
|
+
}>;
|
|
73
|
+
referenceObjectId: z.ZodString;
|
|
74
|
+
throughPointId: z.ZodString;
|
|
75
|
+
toleranceDegrees: z.ZodNumber;
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
78
|
+
} | {
|
|
79
|
+
objectType: z.ZodLiteral<"segment">;
|
|
80
|
+
targetLength: z.ZodNumber;
|
|
81
|
+
toleranceUnits: z.ZodNumber;
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
84
|
+
} | {
|
|
85
|
+
objectType: z.ZodLiteral<"point">;
|
|
86
|
+
referenceObjectId: z.ZodString;
|
|
87
|
+
toleranceUnits: z.ZodNumber;
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
type: z.ZodLiteral<"create" | "throughPoints" | "perpendicular" | "parallel" | "segmentLength" | "midpoint">;
|
|
90
|
+
}, z.core.$strict>[]>>;
|
|
91
|
+
grading: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
extraObjects: z.ZodEnum<{
|
|
93
|
+
allow: "allow";
|
|
94
|
+
reject: "reject";
|
|
95
|
+
}>;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
schemaVersion: z.ZodLiteral<4>;
|
|
98
|
+
entities: z.ZodType<Record<string, {
|
|
99
|
+
kind: "point";
|
|
100
|
+
at: {
|
|
101
|
+
x: number;
|
|
102
|
+
y: number;
|
|
103
|
+
};
|
|
104
|
+
} | {
|
|
105
|
+
kind: "point";
|
|
106
|
+
on: string;
|
|
107
|
+
t: number;
|
|
108
|
+
} | {
|
|
109
|
+
kind: "point";
|
|
110
|
+
intersectionOf: readonly [string, string];
|
|
111
|
+
which?: 0 | 1 | undefined;
|
|
112
|
+
} | {
|
|
113
|
+
kind: "segment";
|
|
114
|
+
parents: readonly [string, string];
|
|
115
|
+
} | {
|
|
116
|
+
kind: "line";
|
|
117
|
+
parents: readonly [string, string];
|
|
118
|
+
} | {
|
|
119
|
+
kind: "circle";
|
|
120
|
+
parents: readonly [string, string];
|
|
121
|
+
} | {
|
|
122
|
+
kind: "angle";
|
|
123
|
+
parents: readonly [string, string, string];
|
|
124
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
125
|
+
kind: "point";
|
|
126
|
+
at: {
|
|
127
|
+
x: number;
|
|
128
|
+
y: number;
|
|
129
|
+
};
|
|
130
|
+
} | {
|
|
131
|
+
kind: "point";
|
|
132
|
+
on: string;
|
|
133
|
+
t: number;
|
|
134
|
+
} | {
|
|
135
|
+
kind: "point";
|
|
136
|
+
intersectionOf: readonly [string, string];
|
|
137
|
+
which?: 0 | 1 | undefined;
|
|
138
|
+
} | {
|
|
139
|
+
kind: "segment";
|
|
140
|
+
parents: readonly [string, string];
|
|
141
|
+
} | {
|
|
142
|
+
kind: "line";
|
|
143
|
+
parents: readonly [string, string];
|
|
144
|
+
} | {
|
|
145
|
+
kind: "circle";
|
|
146
|
+
parents: readonly [string, string];
|
|
147
|
+
} | {
|
|
148
|
+
kind: "angle";
|
|
149
|
+
parents: readonly [string, string, string];
|
|
150
|
+
}>, unknown>>;
|
|
151
|
+
presentation: z.ZodType<Record<string, {
|
|
152
|
+
role: "implicit" | "explicit";
|
|
153
|
+
label?: string | undefined;
|
|
154
|
+
measureLabel?: "degrees" | undefined;
|
|
155
|
+
}>, unknown, z.core.$ZodTypeInternals<Record<string, {
|
|
156
|
+
role: "implicit" | "explicit";
|
|
157
|
+
label?: string | undefined;
|
|
158
|
+
measureLabel?: "degrees" | undefined;
|
|
159
|
+
}>, unknown>>;
|
|
160
|
+
allowedObjects: z.ZodArray<z.ZodEnum<{
|
|
161
|
+
point: "point";
|
|
162
|
+
segment: "segment";
|
|
163
|
+
line: "line";
|
|
164
|
+
circle: "circle";
|
|
165
|
+
angle: "angle";
|
|
166
|
+
}>>;
|
|
167
|
+
solution: z.ZodOptional<z.ZodUnknown>;
|
|
168
|
+
}, z.core.$strict>;
|