@nakafa/aksara-contracts 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/assessment/figure.d.ts +468 -0
  2. package/dist/math/bounds.d.ts +3 -2
  3. package/dist/math/bounds.js +37 -8
  4. package/dist/math/curve.d.ts +42 -0
  5. package/dist/math/curve.js +55 -0
  6. package/dist/math/formula/box.d.ts +61 -0
  7. package/dist/math/formula/box.js +68 -0
  8. package/dist/math/formula/compile.d.ts +11 -0
  9. package/dist/math/formula/compile.js +100 -0
  10. package/dist/math/formula/contour.d.ts +17 -0
  11. package/dist/math/formula/contour.js +162 -0
  12. package/dist/math/formula/field.d.ts +19 -0
  13. package/dist/math/formula/field.js +35 -0
  14. package/dist/math/formula/mesh.d.ts +25 -0
  15. package/dist/math/formula/mesh.js +28 -0
  16. package/dist/math/formula/names.d.ts +4 -0
  17. package/dist/math/formula/names.js +23 -0
  18. package/dist/math/formula/parse.d.ts +10 -0
  19. package/dist/math/formula/parse.js +240 -0
  20. package/dist/math/formula/plane.d.ts +62 -0
  21. package/dist/math/formula/plane.js +175 -0
  22. package/dist/math/formula/reader.d.ts +102 -0
  23. package/dist/math/formula/reader.js +58 -0
  24. package/dist/math/formula/sample.d.ts +14 -0
  25. package/dist/math/formula/sample.js +182 -0
  26. package/dist/math/formula/scope.d.ts +37 -0
  27. package/dist/math/formula/scope.js +137 -0
  28. package/dist/math/formula/space.d.ts +10 -0
  29. package/dist/math/formula/space.js +94 -0
  30. package/dist/math/formula/syntax.d.ts +77 -0
  31. package/dist/math/formula/syntax.js +111 -0
  32. package/dist/math/formula/token.d.ts +43 -0
  33. package/dist/math/formula/token.js +150 -0
  34. package/dist/math/plane.d.ts +85 -0
  35. package/dist/math/plane.js +8 -2
  36. package/dist/math/scene.js +11 -2
  37. package/dist/math/solid.d.ts +124 -0
  38. package/dist/math/solid.js +86 -0
  39. package/dist/math/space.d.ts +213 -0
  40. package/dist/math/space.js +8 -2
  41. package/dist/math/visual.d.ts +454 -0
  42. package/package.json +57 -1
@@ -85,6 +85,45 @@ export declare const MathVisualPropsSchema: Schema.Struct<{
85
85
  readonly placement: Schema.optionalKey<Schema.Literals<readonly ["above", "above-left", "above-right", "below", "below-left", "below-right", "center", "left", "right"]>>;
86
86
  }>>>;
87
87
  readonly objects: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
88
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
89
+ readonly id: Schema.String;
90
+ readonly domain: Schema.optionalKey<Schema.Struct<{
91
+ readonly max: Schema.Finite;
92
+ readonly min: Schema.Finite;
93
+ }>>;
94
+ readonly formula: Schema.String;
95
+ readonly inputAxis: Schema.optionalKey<Schema.Literals<readonly ["x", "y"]>>;
96
+ readonly kind: Schema.Literal<"function">;
97
+ }>, Schema.Struct<{
98
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
99
+ readonly id: Schema.String;
100
+ readonly equation: Schema.String;
101
+ readonly kind: Schema.Literal<"implicit">;
102
+ }>, Schema.Struct<{
103
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
104
+ readonly id: Schema.String;
105
+ readonly kind: Schema.Literal<"parametric">;
106
+ readonly parameter: Schema.Struct<{
107
+ readonly max: Schema.Finite;
108
+ readonly min: Schema.Finite;
109
+ }>;
110
+ readonly x: Schema.String;
111
+ readonly y: Schema.String;
112
+ }>, Schema.Struct<{
113
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
114
+ readonly id: Schema.String;
115
+ readonly angle: Schema.Struct<{
116
+ readonly max: Schema.Finite;
117
+ readonly min: Schema.Finite;
118
+ }>;
119
+ readonly kind: Schema.Literal<"polar">;
120
+ readonly radius: Schema.String;
121
+ }>, Schema.Struct<{
122
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
123
+ readonly id: Schema.String;
124
+ readonly inequalities: Schema.NonEmptyArray<Schema.String>;
125
+ readonly kind: Schema.Literal<"region">;
126
+ }>, Schema.Struct<{
88
127
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
89
128
  readonly id: Schema.String;
90
129
  readonly center: Schema.Struct<{
@@ -193,6 +232,13 @@ export declare const MathVisualPropsSchema: Schema.Struct<{
193
232
  readonly y: Schema.Finite;
194
233
  }>;
195
234
  }>]>>;
235
+ readonly parameters: Schema.optionalKey<Schema.$Array<Schema.Struct<{
236
+ readonly max: Schema.Finite;
237
+ readonly min: Schema.Finite;
238
+ readonly name: Schema.String;
239
+ readonly step: Schema.optionalKey<Schema.Finite>;
240
+ readonly value: Schema.Finite;
241
+ }>>>;
196
242
  readonly space: Schema.Literal<"plane">;
197
243
  readonly view: Schema.Struct<{
198
244
  readonly kind: Schema.Literal<"fit">;
@@ -225,6 +271,109 @@ export declare const MathVisualPropsSchema: Schema.Struct<{
225
271
  readonly placement: Schema.optionalKey<Schema.Literals<readonly ["above", "above-left", "above-right", "below", "below-left", "below-right", "center", "left", "right"]>>;
226
272
  }>>>;
227
273
  readonly objects: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
274
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
275
+ readonly id: Schema.String;
276
+ readonly domain: Schema.optionalKey<Schema.Struct<{
277
+ readonly x: Schema.Struct<{
278
+ readonly max: Schema.Finite;
279
+ readonly min: Schema.Finite;
280
+ }>;
281
+ readonly y: Schema.Struct<{
282
+ readonly max: Schema.Finite;
283
+ readonly min: Schema.Finite;
284
+ }>;
285
+ }>>;
286
+ readonly formula: Schema.String;
287
+ readonly kind: Schema.Literal<"function">;
288
+ }>, Schema.Struct<{
289
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
290
+ readonly id: Schema.String;
291
+ readonly kind: Schema.Literal<"parametric">;
292
+ readonly parameter: Schema.Struct<{
293
+ readonly max: Schema.Finite;
294
+ readonly min: Schema.Finite;
295
+ }>;
296
+ readonly x: Schema.String;
297
+ readonly y: Schema.String;
298
+ readonly z: Schema.String;
299
+ }>, Schema.Struct<{
300
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
301
+ readonly id: Schema.String;
302
+ readonly base: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
303
+ readonly x: Schema.Finite;
304
+ readonly y: Schema.Finite;
305
+ readonly z: Schema.Finite;
306
+ }>, Schema.Struct<{
307
+ readonly x: Schema.Finite;
308
+ readonly y: Schema.Finite;
309
+ readonly z: Schema.Finite;
310
+ }>, Schema.Struct<{
311
+ readonly x: Schema.Finite;
312
+ readonly y: Schema.Finite;
313
+ readonly z: Schema.Finite;
314
+ }>]>, readonly [Schema.Struct<{
315
+ readonly x: Schema.Finite;
316
+ readonly y: Schema.Finite;
317
+ readonly z: Schema.Finite;
318
+ }>]>;
319
+ readonly kind: Schema.Literal<"prism">;
320
+ readonly offset: Schema.Struct<{
321
+ readonly x: Schema.Finite;
322
+ readonly y: Schema.Finite;
323
+ readonly z: Schema.Finite;
324
+ }>;
325
+ }>, Schema.Struct<{
326
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
327
+ readonly id: Schema.String;
328
+ readonly apex: Schema.Struct<{
329
+ readonly x: Schema.Finite;
330
+ readonly y: Schema.Finite;
331
+ readonly z: Schema.Finite;
332
+ }>;
333
+ readonly base: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
334
+ readonly x: Schema.Finite;
335
+ readonly y: Schema.Finite;
336
+ readonly z: Schema.Finite;
337
+ }>, Schema.Struct<{
338
+ readonly x: Schema.Finite;
339
+ readonly y: Schema.Finite;
340
+ readonly z: Schema.Finite;
341
+ }>, Schema.Struct<{
342
+ readonly x: Schema.Finite;
343
+ readonly y: Schema.Finite;
344
+ readonly z: Schema.Finite;
345
+ }>]>, readonly [Schema.Struct<{
346
+ readonly x: Schema.Finite;
347
+ readonly y: Schema.Finite;
348
+ readonly z: Schema.Finite;
349
+ }>]>;
350
+ readonly kind: Schema.Literal<"pyramid">;
351
+ }>, Schema.Struct<{
352
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
353
+ readonly id: Schema.String;
354
+ readonly axis: Schema.Literals<readonly ["x", "y", "z"]>;
355
+ readonly domain: Schema.Struct<{
356
+ readonly max: Schema.Finite;
357
+ readonly min: Schema.Finite;
358
+ }>;
359
+ readonly formula: Schema.String;
360
+ readonly kind: Schema.Literal<"revolution">;
361
+ }>, Schema.Struct<{
362
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
363
+ readonly id: Schema.String;
364
+ readonly kind: Schema.Literal<"surface">;
365
+ readonly u: Schema.Struct<{
366
+ readonly max: Schema.Finite;
367
+ readonly min: Schema.Finite;
368
+ }>;
369
+ readonly v: Schema.Struct<{
370
+ readonly max: Schema.Finite;
371
+ readonly min: Schema.Finite;
372
+ }>;
373
+ readonly x: Schema.String;
374
+ readonly y: Schema.String;
375
+ readonly z: Schema.String;
376
+ }>, Schema.Struct<{
228
377
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
229
378
  readonly id: Schema.String;
230
379
  readonly center: Schema.Struct<{
@@ -327,6 +476,13 @@ export declare const MathVisualPropsSchema: Schema.Struct<{
327
476
  readonly z: Schema.Finite;
328
477
  }>;
329
478
  }>]>>;
479
+ readonly parameters: Schema.optionalKey<Schema.$Array<Schema.Struct<{
480
+ readonly max: Schema.Finite;
481
+ readonly min: Schema.Finite;
482
+ readonly name: Schema.String;
483
+ readonly step: Schema.optionalKey<Schema.Finite>;
484
+ readonly value: Schema.Finite;
485
+ }>>>;
330
486
  readonly space: Schema.Literal<"space">;
331
487
  readonly view: Schema.Union<readonly [Schema.Struct<{
332
488
  readonly kind: Schema.Literal<"camera">;
@@ -755,6 +911,45 @@ export declare const FigureAttrsSchema: Schema.Union<readonly [Schema.Struct<{
755
911
  readonly placement: Schema.optionalKey<Schema.Literals<readonly ["above", "above-left", "above-right", "below", "below-left", "below-right", "center", "left", "right"]>>;
756
912
  }>>>;
757
913
  readonly objects: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
914
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
915
+ readonly id: Schema.String;
916
+ readonly domain: Schema.optionalKey<Schema.Struct<{
917
+ readonly max: Schema.Finite;
918
+ readonly min: Schema.Finite;
919
+ }>>;
920
+ readonly formula: Schema.String;
921
+ readonly inputAxis: Schema.optionalKey<Schema.Literals<readonly ["x", "y"]>>;
922
+ readonly kind: Schema.Literal<"function">;
923
+ }>, Schema.Struct<{
924
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
925
+ readonly id: Schema.String;
926
+ readonly equation: Schema.String;
927
+ readonly kind: Schema.Literal<"implicit">;
928
+ }>, Schema.Struct<{
929
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
930
+ readonly id: Schema.String;
931
+ readonly kind: Schema.Literal<"parametric">;
932
+ readonly parameter: Schema.Struct<{
933
+ readonly max: Schema.Finite;
934
+ readonly min: Schema.Finite;
935
+ }>;
936
+ readonly x: Schema.String;
937
+ readonly y: Schema.String;
938
+ }>, Schema.Struct<{
939
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
940
+ readonly id: Schema.String;
941
+ readonly angle: Schema.Struct<{
942
+ readonly max: Schema.Finite;
943
+ readonly min: Schema.Finite;
944
+ }>;
945
+ readonly kind: Schema.Literal<"polar">;
946
+ readonly radius: Schema.String;
947
+ }>, Schema.Struct<{
948
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
949
+ readonly id: Schema.String;
950
+ readonly inequalities: Schema.NonEmptyArray<Schema.String>;
951
+ readonly kind: Schema.Literal<"region">;
952
+ }>, Schema.Struct<{
758
953
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
759
954
  readonly id: Schema.String;
760
955
  readonly center: Schema.Struct<{
@@ -863,6 +1058,13 @@ export declare const FigureAttrsSchema: Schema.Union<readonly [Schema.Struct<{
863
1058
  readonly y: Schema.Finite;
864
1059
  }>;
865
1060
  }>]>>;
1061
+ readonly parameters: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1062
+ readonly max: Schema.Finite;
1063
+ readonly min: Schema.Finite;
1064
+ readonly name: Schema.String;
1065
+ readonly step: Schema.optionalKey<Schema.Finite>;
1066
+ readonly value: Schema.Finite;
1067
+ }>>>;
866
1068
  readonly space: Schema.Literal<"plane">;
867
1069
  readonly view: Schema.Struct<{
868
1070
  readonly kind: Schema.Literal<"fit">;
@@ -895,6 +1097,109 @@ export declare const FigureAttrsSchema: Schema.Union<readonly [Schema.Struct<{
895
1097
  readonly placement: Schema.optionalKey<Schema.Literals<readonly ["above", "above-left", "above-right", "below", "below-left", "below-right", "center", "left", "right"]>>;
896
1098
  }>>>;
897
1099
  readonly objects: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
1100
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1101
+ readonly id: Schema.String;
1102
+ readonly domain: Schema.optionalKey<Schema.Struct<{
1103
+ readonly x: Schema.Struct<{
1104
+ readonly max: Schema.Finite;
1105
+ readonly min: Schema.Finite;
1106
+ }>;
1107
+ readonly y: Schema.Struct<{
1108
+ readonly max: Schema.Finite;
1109
+ readonly min: Schema.Finite;
1110
+ }>;
1111
+ }>>;
1112
+ readonly formula: Schema.String;
1113
+ readonly kind: Schema.Literal<"function">;
1114
+ }>, Schema.Struct<{
1115
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1116
+ readonly id: Schema.String;
1117
+ readonly kind: Schema.Literal<"parametric">;
1118
+ readonly parameter: Schema.Struct<{
1119
+ readonly max: Schema.Finite;
1120
+ readonly min: Schema.Finite;
1121
+ }>;
1122
+ readonly x: Schema.String;
1123
+ readonly y: Schema.String;
1124
+ readonly z: Schema.String;
1125
+ }>, Schema.Struct<{
1126
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1127
+ readonly id: Schema.String;
1128
+ readonly base: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
1129
+ readonly x: Schema.Finite;
1130
+ readonly y: Schema.Finite;
1131
+ readonly z: Schema.Finite;
1132
+ }>, Schema.Struct<{
1133
+ readonly x: Schema.Finite;
1134
+ readonly y: Schema.Finite;
1135
+ readonly z: Schema.Finite;
1136
+ }>, Schema.Struct<{
1137
+ readonly x: Schema.Finite;
1138
+ readonly y: Schema.Finite;
1139
+ readonly z: Schema.Finite;
1140
+ }>]>, readonly [Schema.Struct<{
1141
+ readonly x: Schema.Finite;
1142
+ readonly y: Schema.Finite;
1143
+ readonly z: Schema.Finite;
1144
+ }>]>;
1145
+ readonly kind: Schema.Literal<"prism">;
1146
+ readonly offset: Schema.Struct<{
1147
+ readonly x: Schema.Finite;
1148
+ readonly y: Schema.Finite;
1149
+ readonly z: Schema.Finite;
1150
+ }>;
1151
+ }>, Schema.Struct<{
1152
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1153
+ readonly id: Schema.String;
1154
+ readonly apex: Schema.Struct<{
1155
+ readonly x: Schema.Finite;
1156
+ readonly y: Schema.Finite;
1157
+ readonly z: Schema.Finite;
1158
+ }>;
1159
+ readonly base: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
1160
+ readonly x: Schema.Finite;
1161
+ readonly y: Schema.Finite;
1162
+ readonly z: Schema.Finite;
1163
+ }>, Schema.Struct<{
1164
+ readonly x: Schema.Finite;
1165
+ readonly y: Schema.Finite;
1166
+ readonly z: Schema.Finite;
1167
+ }>, Schema.Struct<{
1168
+ readonly x: Schema.Finite;
1169
+ readonly y: Schema.Finite;
1170
+ readonly z: Schema.Finite;
1171
+ }>]>, readonly [Schema.Struct<{
1172
+ readonly x: Schema.Finite;
1173
+ readonly y: Schema.Finite;
1174
+ readonly z: Schema.Finite;
1175
+ }>]>;
1176
+ readonly kind: Schema.Literal<"pyramid">;
1177
+ }>, Schema.Struct<{
1178
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1179
+ readonly id: Schema.String;
1180
+ readonly axis: Schema.Literals<readonly ["x", "y", "z"]>;
1181
+ readonly domain: Schema.Struct<{
1182
+ readonly max: Schema.Finite;
1183
+ readonly min: Schema.Finite;
1184
+ }>;
1185
+ readonly formula: Schema.String;
1186
+ readonly kind: Schema.Literal<"revolution">;
1187
+ }>, Schema.Struct<{
1188
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1189
+ readonly id: Schema.String;
1190
+ readonly kind: Schema.Literal<"surface">;
1191
+ readonly u: Schema.Struct<{
1192
+ readonly max: Schema.Finite;
1193
+ readonly min: Schema.Finite;
1194
+ }>;
1195
+ readonly v: Schema.Struct<{
1196
+ readonly max: Schema.Finite;
1197
+ readonly min: Schema.Finite;
1198
+ }>;
1199
+ readonly x: Schema.String;
1200
+ readonly y: Schema.String;
1201
+ readonly z: Schema.String;
1202
+ }>, Schema.Struct<{
898
1203
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
899
1204
  readonly id: Schema.String;
900
1205
  readonly center: Schema.Struct<{
@@ -997,6 +1302,13 @@ export declare const FigureAttrsSchema: Schema.Union<readonly [Schema.Struct<{
997
1302
  readonly z: Schema.Finite;
998
1303
  }>;
999
1304
  }>]>>;
1305
+ readonly parameters: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1306
+ readonly max: Schema.Finite;
1307
+ readonly min: Schema.Finite;
1308
+ readonly name: Schema.String;
1309
+ readonly step: Schema.optionalKey<Schema.Finite>;
1310
+ readonly value: Schema.Finite;
1311
+ }>>>;
1000
1312
  readonly space: Schema.Literal<"space">;
1001
1313
  readonly view: Schema.Union<readonly [Schema.Struct<{
1002
1314
  readonly kind: Schema.Literal<"camera">;
@@ -1496,6 +1808,45 @@ export declare const FigureNodeSchema: Schema.Struct<{
1496
1808
  readonly placement: Schema.optionalKey<Schema.Literals<readonly ["above", "above-left", "above-right", "below", "below-left", "below-right", "center", "left", "right"]>>;
1497
1809
  }>>>;
1498
1810
  readonly objects: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
1811
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1812
+ readonly id: Schema.String;
1813
+ readonly domain: Schema.optionalKey<Schema.Struct<{
1814
+ readonly max: Schema.Finite;
1815
+ readonly min: Schema.Finite;
1816
+ }>>;
1817
+ readonly formula: Schema.String;
1818
+ readonly inputAxis: Schema.optionalKey<Schema.Literals<readonly ["x", "y"]>>;
1819
+ readonly kind: Schema.Literal<"function">;
1820
+ }>, Schema.Struct<{
1821
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1822
+ readonly id: Schema.String;
1823
+ readonly equation: Schema.String;
1824
+ readonly kind: Schema.Literal<"implicit">;
1825
+ }>, Schema.Struct<{
1826
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1827
+ readonly id: Schema.String;
1828
+ readonly kind: Schema.Literal<"parametric">;
1829
+ readonly parameter: Schema.Struct<{
1830
+ readonly max: Schema.Finite;
1831
+ readonly min: Schema.Finite;
1832
+ }>;
1833
+ readonly x: Schema.String;
1834
+ readonly y: Schema.String;
1835
+ }>, Schema.Struct<{
1836
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1837
+ readonly id: Schema.String;
1838
+ readonly angle: Schema.Struct<{
1839
+ readonly max: Schema.Finite;
1840
+ readonly min: Schema.Finite;
1841
+ }>;
1842
+ readonly kind: Schema.Literal<"polar">;
1843
+ readonly radius: Schema.String;
1844
+ }>, Schema.Struct<{
1845
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1846
+ readonly id: Schema.String;
1847
+ readonly inequalities: Schema.NonEmptyArray<Schema.String>;
1848
+ readonly kind: Schema.Literal<"region">;
1849
+ }>, Schema.Struct<{
1499
1850
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1500
1851
  readonly id: Schema.String;
1501
1852
  readonly center: Schema.Struct<{
@@ -1604,6 +1955,13 @@ export declare const FigureNodeSchema: Schema.Struct<{
1604
1955
  readonly y: Schema.Finite;
1605
1956
  }>;
1606
1957
  }>]>>;
1958
+ readonly parameters: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1959
+ readonly max: Schema.Finite;
1960
+ readonly min: Schema.Finite;
1961
+ readonly name: Schema.String;
1962
+ readonly step: Schema.optionalKey<Schema.Finite>;
1963
+ readonly value: Schema.Finite;
1964
+ }>>>;
1607
1965
  readonly space: Schema.Literal<"plane">;
1608
1966
  readonly view: Schema.Struct<{
1609
1967
  readonly kind: Schema.Literal<"fit">;
@@ -1636,6 +1994,109 @@ export declare const FigureNodeSchema: Schema.Struct<{
1636
1994
  readonly placement: Schema.optionalKey<Schema.Literals<readonly ["above", "above-left", "above-right", "below", "below-left", "below-right", "center", "left", "right"]>>;
1637
1995
  }>>>;
1638
1996
  readonly objects: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
1997
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1998
+ readonly id: Schema.String;
1999
+ readonly domain: Schema.optionalKey<Schema.Struct<{
2000
+ readonly x: Schema.Struct<{
2001
+ readonly max: Schema.Finite;
2002
+ readonly min: Schema.Finite;
2003
+ }>;
2004
+ readonly y: Schema.Struct<{
2005
+ readonly max: Schema.Finite;
2006
+ readonly min: Schema.Finite;
2007
+ }>;
2008
+ }>>;
2009
+ readonly formula: Schema.String;
2010
+ readonly kind: Schema.Literal<"function">;
2011
+ }>, Schema.Struct<{
2012
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
2013
+ readonly id: Schema.String;
2014
+ readonly kind: Schema.Literal<"parametric">;
2015
+ readonly parameter: Schema.Struct<{
2016
+ readonly max: Schema.Finite;
2017
+ readonly min: Schema.Finite;
2018
+ }>;
2019
+ readonly x: Schema.String;
2020
+ readonly y: Schema.String;
2021
+ readonly z: Schema.String;
2022
+ }>, Schema.Struct<{
2023
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
2024
+ readonly id: Schema.String;
2025
+ readonly base: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
2026
+ readonly x: Schema.Finite;
2027
+ readonly y: Schema.Finite;
2028
+ readonly z: Schema.Finite;
2029
+ }>, Schema.Struct<{
2030
+ readonly x: Schema.Finite;
2031
+ readonly y: Schema.Finite;
2032
+ readonly z: Schema.Finite;
2033
+ }>, Schema.Struct<{
2034
+ readonly x: Schema.Finite;
2035
+ readonly y: Schema.Finite;
2036
+ readonly z: Schema.Finite;
2037
+ }>]>, readonly [Schema.Struct<{
2038
+ readonly x: Schema.Finite;
2039
+ readonly y: Schema.Finite;
2040
+ readonly z: Schema.Finite;
2041
+ }>]>;
2042
+ readonly kind: Schema.Literal<"prism">;
2043
+ readonly offset: Schema.Struct<{
2044
+ readonly x: Schema.Finite;
2045
+ readonly y: Schema.Finite;
2046
+ readonly z: Schema.Finite;
2047
+ }>;
2048
+ }>, Schema.Struct<{
2049
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
2050
+ readonly id: Schema.String;
2051
+ readonly apex: Schema.Struct<{
2052
+ readonly x: Schema.Finite;
2053
+ readonly y: Schema.Finite;
2054
+ readonly z: Schema.Finite;
2055
+ }>;
2056
+ readonly base: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
2057
+ readonly x: Schema.Finite;
2058
+ readonly y: Schema.Finite;
2059
+ readonly z: Schema.Finite;
2060
+ }>, Schema.Struct<{
2061
+ readonly x: Schema.Finite;
2062
+ readonly y: Schema.Finite;
2063
+ readonly z: Schema.Finite;
2064
+ }>, Schema.Struct<{
2065
+ readonly x: Schema.Finite;
2066
+ readonly y: Schema.Finite;
2067
+ readonly z: Schema.Finite;
2068
+ }>]>, readonly [Schema.Struct<{
2069
+ readonly x: Schema.Finite;
2070
+ readonly y: Schema.Finite;
2071
+ readonly z: Schema.Finite;
2072
+ }>]>;
2073
+ readonly kind: Schema.Literal<"pyramid">;
2074
+ }>, Schema.Struct<{
2075
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
2076
+ readonly id: Schema.String;
2077
+ readonly axis: Schema.Literals<readonly ["x", "y", "z"]>;
2078
+ readonly domain: Schema.Struct<{
2079
+ readonly max: Schema.Finite;
2080
+ readonly min: Schema.Finite;
2081
+ }>;
2082
+ readonly formula: Schema.String;
2083
+ readonly kind: Schema.Literal<"revolution">;
2084
+ }>, Schema.Struct<{
2085
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
2086
+ readonly id: Schema.String;
2087
+ readonly kind: Schema.Literal<"surface">;
2088
+ readonly u: Schema.Struct<{
2089
+ readonly max: Schema.Finite;
2090
+ readonly min: Schema.Finite;
2091
+ }>;
2092
+ readonly v: Schema.Struct<{
2093
+ readonly max: Schema.Finite;
2094
+ readonly min: Schema.Finite;
2095
+ }>;
2096
+ readonly x: Schema.String;
2097
+ readonly y: Schema.String;
2098
+ readonly z: Schema.String;
2099
+ }>, Schema.Struct<{
1639
2100
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
1640
2101
  readonly id: Schema.String;
1641
2102
  readonly center: Schema.Struct<{
@@ -1738,6 +2199,13 @@ export declare const FigureNodeSchema: Schema.Struct<{
1738
2199
  readonly z: Schema.Finite;
1739
2200
  }>;
1740
2201
  }>]>>;
2202
+ readonly parameters: Schema.optionalKey<Schema.$Array<Schema.Struct<{
2203
+ readonly max: Schema.Finite;
2204
+ readonly min: Schema.Finite;
2205
+ readonly name: Schema.String;
2206
+ readonly step: Schema.optionalKey<Schema.Finite>;
2207
+ readonly value: Schema.Finite;
2208
+ }>>>;
1741
2209
  readonly space: Schema.Literal<"space">;
1742
2210
  readonly view: Schema.Union<readonly [Schema.Struct<{
1743
2211
  readonly kind: Schema.Literal<"camera">;
@@ -1,7 +1,8 @@
1
1
  import { type Schema } from "effect";
2
+ import type { FormulaScope } from "#contracts/math/formula/compile";
2
3
  import type { PlaneLabelAnchor, PlaneMathFrame, PlaneMathObject } from "#contracts/math/plane";
3
4
  import type { SpaceLabelAnchor, SpaceMathFrame, SpaceMathObject, SpaceMathView } from "#contracts/math/space";
4
5
  /** Reports every finite plane object or label that escapes its authored frame. */
5
- export declare function planeBoundsIssues(frame: PlaneMathFrame, objects: readonly PlaneMathObject[], labels: readonly PlaneLabelAnchor[]): readonly Schema.FilterIssue[];
6
+ export declare function planeBoundsIssues(frame: PlaneMathFrame, objects: readonly PlaneMathObject[], labels: readonly PlaneLabelAnchor[], scope?: FormulaScope): readonly Schema.FilterIssue[];
6
7
  /** Reports every finite space object, label, or view target outside its frame. */
7
- export declare function spaceBoundsIssues(frame: SpaceMathFrame, objects: readonly SpaceMathObject[], labels: readonly SpaceLabelAnchor[], view: SpaceMathView): readonly Schema.FilterIssue[];
8
+ export declare function spaceBoundsIssues(frame: SpaceMathFrame, objects: readonly SpaceMathObject[], labels: readonly SpaceLabelAnchor[], view: SpaceMathView, scope?: FormulaScope): readonly Schema.FilterIssue[];
@@ -1,5 +1,8 @@
1
- import { Array as Arr } from "effect";
1
+ import { Array as Arr, Result } from "effect";
2
2
  import { arcContained, axisContains, circleContained, cuboidContained, quadraticContained, } from "#contracts/math/extent";
3
+ import { planeFormulaGeometry, } from "#contracts/math/formula/plane";
4
+ import { geometryVisible } from "#contracts/math/formula/scope";
5
+ import { spaceFormulaGeometry } from "#contracts/math/formula/space";
3
6
  import { infinitePathIntersectsBox } from "#contracts/math/intersection";
4
7
  /** Checks one plane point against both inclusive frame ranges. */
5
8
  function planeContains(frame, point) {
@@ -31,8 +34,26 @@ function spaceAxes(frame, start, through) {
31
34
  { range: frame.z, start: start.z, through: through.z },
32
35
  ];
33
36
  }
34
- /** Checks whether one plane object has complete visible geometry in its frame. */
35
- function planeObjectContained(frame, object) {
37
+ /**
38
+ * Whether a formula's samples show anything inside the frame. A formula that
39
+ * does not read is reported by its own field, so it is not reported again.
40
+ */
41
+ function sampledVisible(geometry, frame) {
42
+ return Result.isFailure(geometry) || geometryVisible(geometry.success, frame);
43
+ }
44
+ /** Checks whether one plane object shows visible geometry in its frame. */
45
+ function planeObjectContained(frame, object, scope, labels) {
46
+ if (object.kind === "function") {
47
+ const axis = object.inputAxis ?? "x";
48
+ const named = Arr.flatMap(labels, ({ at, objectId }) => objectId === object.id ? [at[axis]] : []);
49
+ return sampledVisible(planeFormulaGeometry(object, frame, scope, named), frame);
50
+ }
51
+ if (object.kind === "implicit" ||
52
+ object.kind === "parametric" ||
53
+ object.kind === "polar" ||
54
+ object.kind === "region") {
55
+ return sampledVisible(planeFormulaGeometry(object, frame, scope), frame);
56
+ }
36
57
  if (object.kind === "line") {
37
58
  const [start, through] = object.through;
38
59
  return infinitePathIntersectsBox(object.kind, planeAxes(frame, start, through));
@@ -58,7 +79,15 @@ function planeObjectContained(frame, object) {
58
79
  return quadraticContained(frame, object);
59
80
  }
60
81
  /** Checks whether one space object has complete visible geometry in its frame. */
61
- function spaceObjectContained(frame, object) {
82
+ function spaceObjectContained(frame, object, scope) {
83
+ if (object.kind === "function" ||
84
+ object.kind === "parametric" ||
85
+ object.kind === "prism" ||
86
+ object.kind === "pyramid" ||
87
+ object.kind === "revolution" ||
88
+ object.kind === "surface") {
89
+ return sampledVisible(spaceFormulaGeometry(object, frame, scope), frame);
90
+ }
62
91
  if (object.kind === "line") {
63
92
  const [start, through] = object.through;
64
93
  return infinitePathIntersectsBox(object.kind, spaceAxes(frame, start, through));
@@ -78,9 +107,9 @@ function spaceObjectContained(frame, object) {
78
107
  return cuboidContained(frame, object);
79
108
  }
80
109
  /** Reports every finite plane object or label that escapes its authored frame. */
81
- export function planeBoundsIssues(frame, objects, labels) {
110
+ export function planeBoundsIssues(frame, objects, labels, scope = {}) {
82
111
  return [
83
- ...Arr.flatMap(objects, (object, index) => planeObjectContained(frame, object)
112
+ ...Arr.flatMap(objects, (object, index) => planeObjectContained(frame, object, scope, labels)
84
113
  ? []
85
114
  : [
86
115
  {
@@ -99,7 +128,7 @@ export function planeBoundsIssues(frame, objects, labels) {
99
128
  ];
100
129
  }
101
130
  /** Reports every finite space object, label, or view target outside its frame. */
102
- export function spaceBoundsIssues(frame, objects, labels, view) {
131
+ export function spaceBoundsIssues(frame, objects, labels, view, scope = {}) {
103
132
  const viewIssues = view.kind === "isometric" &&
104
133
  view.target !== undefined &&
105
134
  !spaceContains(frame, view.target)
@@ -111,7 +140,7 @@ export function spaceBoundsIssues(frame, objects, labels, view) {
111
140
  ]
112
141
  : [];
113
142
  return [
114
- ...Arr.flatMap(objects, (object, index) => spaceObjectContained(frame, object)
143
+ ...Arr.flatMap(objects, (object, index) => spaceObjectContained(frame, object, scope)
115
144
  ? []
116
145
  : [
117
146
  {