@nakafa/aksara-contracts 8.2.0 → 8.4.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.
Files changed (214) hide show
  1. package/dist/assessment/document.d.ts +1 -1
  2. package/dist/assessment/document.js +1 -1
  3. package/dist/assessment/figure.d.ts +1 -1
  4. package/dist/assessment/figure.js +1 -1
  5. package/dist/assessment/fit.d.ts +3 -3
  6. package/dist/assessment/fit.js +3 -3
  7. package/dist/assessment/locales.d.ts +1 -1
  8. package/dist/assessment/scoring.d.ts +1 -1
  9. package/dist/assessment/scoring.js +1 -1
  10. package/dist/cache/content.d.ts +1 -1
  11. package/dist/cache/content.js +1 -1
  12. package/dist/content.d.ts +3 -2
  13. package/dist/graph/identity.d.ts +1 -1
  14. package/dist/graph/identity.js +1 -1
  15. package/dist/math/boundary.d.ts +9 -0
  16. package/dist/math/boundary.js +81 -0
  17. package/dist/math/bounds.d.ts +1 -1
  18. package/dist/math/collision.d.ts +1 -1
  19. package/dist/math/coordinate.d.ts +6 -5
  20. package/dist/math/coordinate.js +2 -2
  21. package/dist/math/curve.d.ts +1 -0
  22. package/dist/math/curve.js +4 -2
  23. package/dist/math/formula/affine.d.ts +22 -0
  24. package/dist/math/formula/affine.js +79 -0
  25. package/dist/math/formula/compile.d.ts +1 -1
  26. package/dist/math/formula/compile.js +1 -1
  27. package/dist/math/formula/contour.d.ts +1 -1
  28. package/dist/math/formula/contour.js +28 -13
  29. package/dist/math/formula/field.js +1 -1
  30. package/dist/math/formula/mesh.d.ts +1 -1
  31. package/dist/math/formula/mesh.js +1 -1
  32. package/dist/math/formula/names.d.ts +1 -1
  33. package/dist/math/formula/names.js +1 -1
  34. package/dist/math/formula/parse.d.ts +1 -1
  35. package/dist/math/formula/parse.js +1 -1
  36. package/dist/math/formula/plane.d.ts +2 -2
  37. package/dist/math/formula/plane.js +3 -3
  38. package/dist/math/formula/reader.d.ts +2 -1
  39. package/dist/math/formula/reader.js +1 -1
  40. package/dist/math/formula/region.d.ts +2 -2
  41. package/dist/math/formula/region.js +3 -3
  42. package/dist/math/formula/sample.d.ts +1 -1
  43. package/dist/math/formula/scan.d.ts +1 -1
  44. package/dist/math/formula/scan.js +1 -1
  45. package/dist/math/formula/slider.d.ts +2 -2
  46. package/dist/math/formula/slider.js +1 -1
  47. package/dist/math/formula/space.d.ts +1 -1
  48. package/dist/math/formula/space.js +1 -1
  49. package/dist/math/object.d.ts +12 -0
  50. package/dist/math/object.js +11 -0
  51. package/dist/math/plane.d.ts +10 -0
  52. package/dist/math/plane.js +7 -1
  53. package/dist/math/precision.d.ts +1 -1
  54. package/dist/math/precision.js +1 -1
  55. package/dist/math/resolution.js +1 -1
  56. package/dist/math/scene.d.ts +2 -2
  57. package/dist/math/space.d.ts +8 -0
  58. package/dist/math/space.js +5 -1
  59. package/dist/math/vector.d.ts +1 -1
  60. package/dist/math/visual.d.ts +239 -212
  61. package/dist/preview/spec.js +1 -1
  62. package/dist/program/curriculum.d.ts +1 -1
  63. package/dist/program/curriculum.js +1 -1
  64. package/dist/program/snapshot/digest.d.ts +1 -1
  65. package/dist/program/snapshot/digest.js +2 -2
  66. package/dist/program/snapshot/hash.d.ts +2 -2
  67. package/dist/projection/digest.d.ts +1 -1
  68. package/dist/projection/digest.js +1 -1
  69. package/dist/projection/hash.js +1 -1
  70. package/dist/projection/material.d.ts +1 -1
  71. package/dist/projection/material.js +1 -1
  72. package/dist/projection/verify.js +1 -1
  73. package/dist/quran/identity.d.ts +2 -1
  74. package/dist/quran/provenance.d.ts +2 -2
  75. package/dist/quran/provenance.js +1 -1
  76. package/dist/quran/snapshot/hash.d.ts +1 -1
  77. package/dist/quran/snapshot/row/hash.d.ts +1 -1
  78. package/dist/quran/snapshot/row/hash.js +1 -1
  79. package/dist/quran/snapshot/spec.js +1 -1
  80. package/dist/quran/source.d.ts +2 -2
  81. package/dist/release/current/evidence.d.ts +1 -1
  82. package/dist/release/current/evidence.js +1 -1
  83. package/dist/release/current/state.d.ts +1 -1
  84. package/dist/release/current/state.js +1 -1
  85. package/dist/release/head.js +1 -1
  86. package/dist/release/items.d.ts +1 -1
  87. package/dist/release/items.js +1 -1
  88. package/dist/release/policy.d.ts +1 -1
  89. package/dist/release/policy.js +1 -1
  90. package/dist/release/result/digest.d.ts +3 -3
  91. package/dist/release/result/digest.js +2 -2
  92. package/dist/release/rollback/digest.d.ts +1 -1
  93. package/dist/release/rollback/digest.js +1 -1
  94. package/dist/release/route/digest.d.ts +1 -1
  95. package/dist/release/route/digest.js +1 -1
  96. package/dist/release/snapshot/evidence/assessment.d.ts +1 -1
  97. package/dist/release/snapshot/evidence/assessment.js +1 -1
  98. package/dist/release/snapshot/evidence/program.d.ts +1 -1
  99. package/dist/release/snapshot/evidence/program.js +1 -1
  100. package/dist/release/snapshot/evidence/quran.d.ts +1 -1
  101. package/dist/release/snapshot/evidence/quran.js +1 -1
  102. package/dist/release/snapshot/evidence/requirement.d.ts +3 -2
  103. package/dist/release/snapshot/evidence/requirement.js +1 -1
  104. package/dist/release/snapshot/spec.d.ts +2 -2
  105. package/dist/release/snapshot/spec.js +1 -1
  106. package/dist/release/snapshot/verify.d.ts +1 -1
  107. package/dist/release/snapshot/verify.js +1 -1
  108. package/dist/release/spec.d.ts +1 -1
  109. package/dist/release/verify.d.ts +1 -1
  110. package/dist/release/verify.js +1 -1
  111. package/dist/renderer/compatibility.d.ts +1 -1
  112. package/dist/renderer/compatibility.js +2 -2
  113. package/dist/renderer/contract.d.ts +1 -1
  114. package/dist/renderer/contract.js +1 -1
  115. package/dist/runtime/spec.js +2 -2
  116. package/dist/signature/spec.d.ts +3 -2
  117. package/dist/signature/verify.d.ts +2 -1
  118. package/dist/transport/request.d.ts +1 -1
  119. package/dist/visual/base/math.d.ts +79 -1
  120. package/dist/visual/base/math.js +31 -3
  121. package/dist/visual/base/media.d.ts +68 -1
  122. package/dist/visual/biology/bacteria.d.ts +269 -1
  123. package/dist/visual/biology/bacteria.js +1 -1
  124. package/dist/visual/biology/cell.d.ts +202 -1
  125. package/dist/visual/biology/climate.d.ts +202 -1
  126. package/dist/visual/biology/climate.js +1 -1
  127. package/dist/visual/biology/ecology.d.ts +269 -1
  128. package/dist/visual/biology/physiology.d.ts +202 -1
  129. package/dist/visual/biology/physiology.js +1 -1
  130. package/dist/visual/biology/plant.d.ts +336 -1
  131. package/dist/visual/biology/plant.js +1 -1
  132. package/dist/visual/biology.d.ts +1 -1
  133. package/dist/visual/card.d.ts +79 -1
  134. package/dist/visual/card.js +18 -2
  135. package/dist/visual/catalog.d.ts +14164 -2
  136. package/dist/visual/catalog.js +4 -0
  137. package/dist/visual/chemistry/atom.d.ts +202 -1
  138. package/dist/visual/chemistry/atom.js +1 -1
  139. package/dist/visual/chemistry/balance.d.ts +336 -1
  140. package/dist/visual/chemistry/balance.js +1 -1
  141. package/dist/visual/chemistry/bonding.d.ts +336 -1
  142. package/dist/visual/chemistry/discovery.d.ts +470 -1
  143. package/dist/visual/chemistry/electrochemistry.d.ts +135 -1
  144. package/dist/visual/chemistry/electrochemistry.js +1 -1
  145. package/dist/visual/chemistry/electron.d.ts +135 -1
  146. package/dist/visual/chemistry/electron.js +1 -1
  147. package/dist/visual/chemistry/laws.d.ts +269 -1
  148. package/dist/visual/chemistry/laws.js +1 -1
  149. package/dist/visual/chemistry/particles.d.ts +336 -1
  150. package/dist/visual/chemistry/periodic.d.ts +135 -1
  151. package/dist/visual/chemistry/periodic.js +1 -1
  152. package/dist/visual/chemistry/rate.d.ts +68 -1
  153. package/dist/visual/chemistry/rate.js +1 -1
  154. package/dist/visual/chemistry/reaction.d.ts +202 -1
  155. package/dist/visual/chemistry/reaction.js +1 -1
  156. package/dist/visual/chemistry/titration.d.ts +68 -1
  157. package/dist/visual/chemistry/titration.js +1 -1
  158. package/dist/visual/length.d.ts +79 -0
  159. package/dist/visual/length.js +37 -0
  160. package/dist/visual/mathematics/chance.d.ts +258 -0
  161. package/dist/visual/mathematics/chance.js +117 -0
  162. package/dist/visual/mathematics/chart.d.ts +68 -1
  163. package/dist/visual/mathematics/charts.d.ts +336 -1
  164. package/dist/visual/mathematics/function.d.ts +202 -1
  165. package/dist/visual/mathematics/numeral.d.ts +170 -0
  166. package/dist/visual/mathematics/numeral.js +85 -0
  167. package/dist/visual/physics/braking.d.ts +269 -1
  168. package/dist/visual/physics/braking.js +1 -1
  169. package/dist/visual/physics/circuit.d.ts +269 -1
  170. package/dist/visual/physics/circular.d.ts +135 -1
  171. package/dist/visual/physics/circular.js +1 -1
  172. package/dist/visual/physics/dynamics.d.ts +470 -1
  173. package/dist/visual/physics/dynamics.js +1 -1
  174. package/dist/visual/physics/efficiency.d.ts +403 -1
  175. package/dist/visual/physics/efficiency.js +1 -1
  176. package/dist/visual/physics/electronics.d.ts +202 -1
  177. package/dist/visual/physics/falling.d.ts +269 -1
  178. package/dist/visual/physics/falling.js +1 -1
  179. package/dist/visual/physics/field.d.ts +202 -1
  180. package/dist/visual/physics/fluid.d.ts +269 -1
  181. package/dist/visual/physics/fluid.js +1 -1
  182. package/dist/visual/physics/force.d.ts +336 -1
  183. package/dist/visual/physics/gravity.d.ts +135 -1
  184. package/dist/visual/physics/heat.d.ts +202 -1
  185. package/dist/visual/physics/heat.js +1 -1
  186. package/dist/visual/physics/instrument.d.ts +470 -1
  187. package/dist/visual/physics/light.d.ts +269 -1
  188. package/dist/visual/physics/light.js +1 -1
  189. package/dist/visual/physics/measurement.d.ts +269 -1
  190. package/dist/visual/physics/measurement.js +1 -1
  191. package/dist/visual/physics/motion.d.ts +403 -1
  192. package/dist/visual/physics/nuclear.d.ts +202 -1
  193. package/dist/visual/physics/parabolic.d.ts +68 -1
  194. package/dist/visual/physics/position.d.ts +403 -1
  195. package/dist/visual/physics/position.js +1 -1
  196. package/dist/visual/physics/power.d.ts +537 -1
  197. package/dist/visual/physics/power.js +1 -1
  198. package/dist/visual/physics/precision.d.ts +470 -1
  199. package/dist/visual/physics/precision.js +1 -1
  200. package/dist/visual/physics/product.d.ts +269 -1
  201. package/dist/visual/physics/reading.d.ts +202 -1
  202. package/dist/visual/physics/reading.js +1 -1
  203. package/dist/visual/physics/record.d.ts +135 -1
  204. package/dist/visual/physics/record.js +1 -1
  205. package/dist/visual/physics/relative.d.ts +202 -1
  206. package/dist/visual/physics/relative.js +1 -1
  207. package/dist/visual/physics/solar.d.ts +403 -1
  208. package/dist/visual/physics/solar.js +1 -1
  209. package/dist/visual/physics/vector.d.ts +336 -1
  210. package/dist/visual/physics/vector.js +1 -1
  211. package/dist/visual/physics/velocity.d.ts +470 -1
  212. package/dist/visual/physics/wave.d.ts +269 -1
  213. package/dist/visual/politics.d.ts +403 -1
  214. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { type SampleBox, type SamplePoint, type SampleRange } from "#contracts/math/formula/box";
1
+ import type { SampleBox, SamplePoint, SampleRange } from "#contracts/math/formula/box";
2
2
  /** One visible, unbroken run of a sampled curve, in authored coordinates. */
3
3
  export type SampleBranch = readonly SamplePoint[];
4
4
  /** Where a curve stands for one parameter value; NaN where it is undefined. */
@@ -1,5 +1,5 @@
1
1
  import type { SampleBox } from "#contracts/math/formula/box";
2
- import { type SampleField } from "#contracts/math/formula/contour";
2
+ import type { SampleField } from "#contracts/math/formula/contour";
3
3
  /** The field's values at the four corners of one cell, counterclockwise from the bottom left. */
4
4
  export type CellValues = readonly [number, number, number, number];
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { Array as Arr, MutableHashMap, Option } from "effect";
2
- import { CONTOUR_CELLS, } from "#contracts/math/formula/contour";
2
+ import { CONTOUR_CELLS } from "#contracts/math/formula/contour";
3
3
  /** The field at every corner of one grid column, bottom to top. */
4
4
  function columnValues(field, box, cells, column) {
5
5
  const dx = (box.x.max - box.x.min) / cells;
@@ -1,5 +1,5 @@
1
- import { type Schema } from "effect";
2
- import { type FormulaParameter, type FormulaReadout } from "#contracts/math/formula/field";
1
+ import type { Schema } from "effect";
2
+ import type { FormulaParameter, FormulaReadout } from "#contracts/math/formula/field";
3
3
  import type { PlaneLabelAnchor } from "#contracts/math/plane";
4
4
  /**
5
5
  * Reports every label position or readout formula that reads a name other
@@ -1,5 +1,5 @@
1
1
  import { Array as Arr } from "effect";
2
- import { isPlaneFormulaPoint, } from "#contracts/math/formula/field";
2
+ import { isPlaneFormulaPoint } from "#contracts/math/formula/field";
3
3
  import { expression, strayIssues } from "#contracts/math/formula/scope";
4
4
  /**
5
5
  * Reports every label position or readout formula that reads a name other
@@ -1,7 +1,7 @@
1
1
  import { Result } from "effect";
2
2
  import type { SampleBox } from "#contracts/math/formula/box";
3
3
  import type { FormulaScope } from "#contracts/math/formula/compile";
4
- import { type FormulaGeometry } from "#contracts/math/formula/plane";
4
+ import type { FormulaGeometry } from "#contracts/math/formula/plane";
5
5
  import type { FormulaError } from "#contracts/math/formula/syntax";
6
6
  import type { SpaceSolidObjectSchemas } from "#contracts/math/solid";
7
7
  /** The space objects a formula or a face defines. */
@@ -1,6 +1,6 @@
1
1
  import { Array as Arr, Result } from "effect";
2
2
  import { sampleGrid } from "#contracts/math/formula/mesh";
3
- import { compileText, evaluateWith, } from "#contracts/math/formula/plane";
3
+ import { compileText, evaluateWith } from "#contracts/math/formula/plane";
4
4
  import { sampleCurve } from "#contracts/math/formula/sample";
5
5
  const FULL_TURN = { max: 2 * Math.PI, min: 0 };
6
6
  /** Moves one point by an offset. */
@@ -4,6 +4,18 @@ export declare const MathObjectFields: {
4
4
  appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
5
5
  id: Schema.String;
6
6
  };
7
+ /**
8
+ * How a straight object draws its line when not solid. `dashed` marks points
9
+ * that do not belong to what the line shows, such as the boundary of a strict
10
+ * inequality: the points on `2x + 5y = 10` are not solutions of
11
+ * `2x + 5y < 10`. A line without a stroke is solid.
12
+ */
13
+ export declare const MathStrokeSchema: Schema.Literals<readonly ["dashed"]>;
14
+ export type MathStroke = typeof MathStrokeSchema.Type;
15
+ /** Fields of an object drawn as one stroke: a line, ray, segment, polyline or graph. */
16
+ export declare const MathStrokeFields: {
17
+ stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
18
+ };
7
19
  /**
8
20
  * Fields that every rich-label anchor shares. Each dimension supplies its own
9
21
  * point schema, so the struct built from these fields stays fully typed.
@@ -5,6 +5,17 @@ export const MathObjectFields = {
5
5
  appearance: MathAppearanceSchema,
6
6
  id: MathVisualKeySchema,
7
7
  };
8
+ /**
9
+ * How a straight object draws its line when not solid. `dashed` marks points
10
+ * that do not belong to what the line shows, such as the boundary of a strict
11
+ * inequality: the points on `2x + 5y = 10` are not solutions of
12
+ * `2x + 5y < 10`. A line without a stroke is solid.
13
+ */
14
+ export const MathStrokeSchema = Schema.Literals(["dashed"]);
15
+ /** Fields of an object drawn as one stroke: a line, ray, segment, polyline or graph. */
16
+ export const MathStrokeFields = {
17
+ stroke: Schema.optionalKey(MathStrokeSchema),
18
+ };
8
19
  /**
9
20
  * Fields that every rich-label anchor shares. Each dimension supplies its own
10
21
  * point schema, so the struct built from these fields stays fully typed.
@@ -3,6 +3,7 @@ import { Schema } from "effect";
3
3
  export declare const PlaneMathObjectSchema: Schema.Union<readonly [Schema.Struct<{
4
4
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
5
5
  readonly id: Schema.String;
6
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
6
7
  readonly domain: Schema.optionalKey<Schema.Struct<{
7
8
  readonly max: Schema.Finite;
8
9
  readonly min: Schema.Finite;
@@ -84,6 +85,7 @@ export declare const PlaneMathObjectSchema: Schema.Union<readonly [Schema.Struct
84
85
  }>, Schema.Struct<{
85
86
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
86
87
  readonly id: Schema.String;
88
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
87
89
  readonly kind: Schema.Literal<"line">;
88
90
  readonly through: Schema.Tuple<readonly [Schema.Struct<{
89
91
  readonly x: Schema.Finite;
@@ -120,6 +122,7 @@ export declare const PlaneMathObjectSchema: Schema.Union<readonly [Schema.Struct
120
122
  }>, Schema.Struct<{
121
123
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
122
124
  readonly id: Schema.String;
125
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
123
126
  readonly kind: Schema.Literal<"polyline">;
124
127
  readonly vertices: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
125
128
  readonly x: Schema.Finite;
@@ -148,6 +151,7 @@ export declare const PlaneMathObjectSchema: Schema.Union<readonly [Schema.Struct
148
151
  }>, Schema.Struct<{
149
152
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
150
153
  readonly id: Schema.String;
154
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
151
155
  readonly from: Schema.Struct<{
152
156
  readonly x: Schema.Finite;
153
157
  readonly y: Schema.Finite;
@@ -160,6 +164,7 @@ export declare const PlaneMathObjectSchema: Schema.Union<readonly [Schema.Struct
160
164
  }>, Schema.Struct<{
161
165
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
162
166
  readonly id: Schema.String;
167
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
163
168
  readonly from: Schema.Struct<{
164
169
  readonly x: Schema.Finite;
165
170
  readonly y: Schema.Finite;
@@ -247,6 +252,7 @@ export declare const PlaneMathVisualSchema: Schema.Struct<{
247
252
  readonly objects: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
248
253
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
249
254
  readonly id: Schema.String;
255
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
250
256
  readonly domain: Schema.optionalKey<Schema.Struct<{
251
257
  readonly max: Schema.Finite;
252
258
  readonly min: Schema.Finite;
@@ -328,6 +334,7 @@ export declare const PlaneMathVisualSchema: Schema.Struct<{
328
334
  }>, Schema.Struct<{
329
335
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
330
336
  readonly id: Schema.String;
337
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
331
338
  readonly kind: Schema.Literal<"line">;
332
339
  readonly through: Schema.Tuple<readonly [Schema.Struct<{
333
340
  readonly x: Schema.Finite;
@@ -364,6 +371,7 @@ export declare const PlaneMathVisualSchema: Schema.Struct<{
364
371
  }>, Schema.Struct<{
365
372
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
366
373
  readonly id: Schema.String;
374
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
367
375
  readonly kind: Schema.Literal<"polyline">;
368
376
  readonly vertices: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
369
377
  readonly x: Schema.Finite;
@@ -392,6 +400,7 @@ export declare const PlaneMathVisualSchema: Schema.Struct<{
392
400
  }>, Schema.Struct<{
393
401
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
394
402
  readonly id: Schema.String;
403
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
395
404
  readonly from: Schema.Struct<{
396
405
  readonly x: Schema.Finite;
397
406
  readonly y: Schema.Finite;
@@ -404,6 +413,7 @@ export declare const PlaneMathVisualSchema: Schema.Struct<{
404
413
  }>, Schema.Struct<{
405
414
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
406
415
  readonly id: Schema.String;
416
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
407
417
  readonly from: Schema.Struct<{
408
418
  readonly x: Schema.Finite;
409
419
  readonly y: Schema.Finite;
@@ -1,11 +1,12 @@
1
1
  import { Array as Arr, Schema } from "effect";
2
2
  import { ArcStartDegreesSchema, ArcSweepDegreesSchema, GEOMETRY_TOLERANCE, hasUniquePositions, MathAxisRangeSchema, MathViewPaddingSchema, mathVisualIdentityIssues, PlanePointSchema, PositiveMeasureSchema, samePlanePoint, } from "#contracts/math/base";
3
+ import { strictBoundaryIssues } from "#contracts/math/boundary";
3
4
  import { planeBoundsIssues } from "#contracts/math/bounds";
4
5
  import { PlaneCurveObjectSchemas } from "#contracts/math/curve";
5
6
  import { FormulaParameterSchema, FormulaReadoutSchema, PlaneFormulaPointSchema, } from "#contracts/math/formula/field";
6
7
  import { formulaScopeIssues, parameterScope, planeFormulaFields, } from "#contracts/math/formula/scope";
7
8
  import { sliderFormulaIssues } from "#contracts/math/formula/slider";
8
- import { MATH_LINE_MESSAGE, MATH_POLYLINE_MESSAGE, MATH_RAY_MESSAGE, MATH_SEGMENT_MESSAGE, MATH_VECTOR_MESSAGE, MathObjectFields, mathLabelAnchorFields, } from "#contracts/math/object";
9
+ import { MATH_LINE_MESSAGE, MATH_POLYLINE_MESSAGE, MATH_RAY_MESSAGE, MATH_SEGMENT_MESSAGE, MATH_VECTOR_MESSAGE, MathObjectFields, MathStrokeFields, mathLabelAnchorFields, } from "#contracts/math/object";
9
10
  import { planeResolutionIssues } from "#contracts/math/resolution";
10
11
  /** Checks a plane polygon has non-zero signed area. */
11
12
  function hasPlaneArea(vertices) {
@@ -55,6 +56,7 @@ const PlanePathSchema = Schema.TupleWithRest(Schema.Tuple([PlanePointSchema, Pla
55
56
  const PlaneShapeSchema = Schema.TupleWithRest(Schema.Tuple([PlanePointSchema, PlanePointSchema, PlanePointSchema]), [PlanePointSchema]);
56
57
  const PlaneLineObjectSchema = Schema.Struct({
57
58
  ...MathObjectFields,
59
+ ...MathStrokeFields,
58
60
  kind: Schema.Literal("line"),
59
61
  through: Schema.Tuple([PlanePointSchema, PlanePointSchema]),
60
62
  }).pipe(Schema.check(Schema.makeFilter(({ through: [from, to] }) => !samePlanePoint(from, to), {
@@ -62,6 +64,7 @@ const PlaneLineObjectSchema = Schema.Struct({
62
64
  })));
63
65
  const PlaneRayObjectSchema = Schema.Struct({
64
66
  ...MathObjectFields,
67
+ ...MathStrokeFields,
65
68
  from: PlanePointSchema,
66
69
  kind: Schema.Literal("ray"),
67
70
  through: PlanePointSchema,
@@ -70,6 +73,7 @@ const PlaneRayObjectSchema = Schema.Struct({
70
73
  })));
71
74
  const PlaneSegmentObjectSchema = Schema.Struct({
72
75
  ...MathObjectFields,
76
+ ...MathStrokeFields,
73
77
  from: PlanePointSchema,
74
78
  kind: Schema.Literal("segment"),
75
79
  to: PlanePointSchema,
@@ -90,6 +94,7 @@ const PlaneVectorObjectSchema = Schema.Struct({
90
94
  })));
91
95
  const PlanePolylineObjectSchema = Schema.Struct({
92
96
  ...MathObjectFields,
97
+ ...MathStrokeFields,
93
98
  kind: Schema.Literal("polyline"),
94
99
  vertices: PlanePathSchema,
95
100
  }).pipe(Schema.check(Schema.makeFilter(({ vertices }) => hasUniquePositions(vertices, samePlanePoint), { message: MATH_POLYLINE_MESSAGE })));
@@ -170,4 +175,5 @@ export const PlaneMathVisualSchema = Schema.Struct({
170
175
  ...sliderFormulaIssues(labels, readouts, parameters),
171
176
  ...planeBoundsIssues(frame, objects, labels, parameterScope(parameters)),
172
177
  ...planeResolutionIssues(frame, objects, labels, view),
178
+ ...strictBoundaryIssues(objects),
173
179
  ])));
@@ -1,7 +1,7 @@
1
1
  import { BigDecimal } from "effect";
2
2
  import type { PlanePoint, SpacePoint } from "#contracts/math/base";
3
3
  import type { AxisRange } from "#contracts/math/extent";
4
- import { type AxisTraversal, type InfinitePathKind } from "#contracts/math/intersection";
4
+ import type { AxisTraversal, InfinitePathKind } from "#contracts/math/intersection";
5
5
  export type RenderThreshold = BigDecimal.BigDecimal;
6
6
  /** Returns the exact width of one finite authored axis. */
7
7
  export declare function axisSpan(range: AxisRange): BigDecimal.BigDecimal;
@@ -1,5 +1,5 @@
1
1
  import { BigDecimal, Array as EffectArray, Record as Rec } from "effect";
2
- import { infinitePathInterval, } from "#contracts/math/intersection";
2
+ import { infinitePathInterval } from "#contracts/math/intersection";
3
3
  import { decimal, makeRatio } from "#contracts/math/rational";
4
4
  const FLOAT32_RESOLUTION = BigDecimal.fromStringUnsafe("0.00000011920928955078125");
5
5
  const TWO = BigDecimal.fromBigInt(2n);
@@ -1,7 +1,7 @@
1
1
  import { Array as Arr, MutableHashMap, Schema } from "effect";
2
2
  import { arcCurvatureUnresolved, arcEndpointAxesUnresolved, arcEndpointsUnresolved, } from "#contracts/math/arc";
3
3
  import { concentricRadiusCollisionPaths, coordinateCollisionPaths, } from "#contracts/math/collision";
4
- import { pathAxes, ScenePathSchema, } from "#contracts/math/coordinate";
4
+ import { pathAxes, ScenePathSchema } from "#contracts/math/coordinate";
5
5
  import { axisEnvelopePairs, axisSpan, measureUnresolved, polygonAltitudeUnresolved, quadraticCurvatureUnresolved, renderThreshold, spanUnresolved, visiblePathResolvable, } from "#contracts/math/precision";
6
6
  import { planeSceneCoordinates, spaceSceneCoordinates, } from "#contracts/math/scene";
7
7
  import { encodeJsonText } from "#contracts/text/json";
@@ -1,7 +1,7 @@
1
1
  import { BigDecimal } from "effect";
2
- import { type ScenePath } from "#contracts/math/coordinate";
2
+ import type { ScenePath } from "#contracts/math/coordinate";
3
3
  import type { PlaneLabelAnchor, PlaneMathFrame, PlaneMathObject } from "#contracts/math/plane";
4
- import { type RenderThreshold } from "#contracts/math/precision";
4
+ import type { RenderThreshold } from "#contracts/math/precision";
5
5
  import type { SpaceLabelAnchor, SpaceMathFrame, SpaceMathObject, SpaceMathView } from "#contracts/math/space";
6
6
  /** Owns one stable path for radial geometry-resolution failures. */
7
7
  export declare function radialGeometryPath(kind: "arc" | "circle", index: number): ScenePath;
@@ -120,6 +120,7 @@ export declare const SpaceMathObjectSchema: Schema.Union<readonly [Schema.Struct
120
120
  }>, Schema.Struct<{
121
121
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
122
122
  readonly id: Schema.String;
123
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
123
124
  readonly kind: Schema.Literal<"line">;
124
125
  readonly through: Schema.Tuple<readonly [Schema.Struct<{
125
126
  readonly x: Schema.Finite;
@@ -163,6 +164,7 @@ export declare const SpaceMathObjectSchema: Schema.Union<readonly [Schema.Struct
163
164
  }>, Schema.Struct<{
164
165
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
165
166
  readonly id: Schema.String;
167
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
166
168
  readonly kind: Schema.Literal<"polyline">;
167
169
  readonly vertices: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
168
170
  readonly x: Schema.Finite;
@@ -180,6 +182,7 @@ export declare const SpaceMathObjectSchema: Schema.Union<readonly [Schema.Struct
180
182
  }>, Schema.Struct<{
181
183
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
182
184
  readonly id: Schema.String;
185
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
183
186
  readonly from: Schema.Struct<{
184
187
  readonly x: Schema.Finite;
185
188
  readonly y: Schema.Finite;
@@ -194,6 +197,7 @@ export declare const SpaceMathObjectSchema: Schema.Union<readonly [Schema.Struct
194
197
  }>, Schema.Struct<{
195
198
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
196
199
  readonly id: Schema.String;
200
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
197
201
  readonly from: Schema.Struct<{
198
202
  readonly x: Schema.Finite;
199
203
  readonly y: Schema.Finite;
@@ -422,6 +426,7 @@ export declare const SpaceMathVisualSchema: Schema.Struct<{
422
426
  }>, Schema.Struct<{
423
427
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
424
428
  readonly id: Schema.String;
429
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
425
430
  readonly kind: Schema.Literal<"line">;
426
431
  readonly through: Schema.Tuple<readonly [Schema.Struct<{
427
432
  readonly x: Schema.Finite;
@@ -465,6 +470,7 @@ export declare const SpaceMathVisualSchema: Schema.Struct<{
465
470
  }>, Schema.Struct<{
466
471
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
467
472
  readonly id: Schema.String;
473
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
468
474
  readonly kind: Schema.Literal<"polyline">;
469
475
  readonly vertices: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
470
476
  readonly x: Schema.Finite;
@@ -482,6 +488,7 @@ export declare const SpaceMathVisualSchema: Schema.Struct<{
482
488
  }>, Schema.Struct<{
483
489
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
484
490
  readonly id: Schema.String;
491
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
485
492
  readonly from: Schema.Struct<{
486
493
  readonly x: Schema.Finite;
487
494
  readonly y: Schema.Finite;
@@ -496,6 +503,7 @@ export declare const SpaceMathVisualSchema: Schema.Struct<{
496
503
  }>, Schema.Struct<{
497
504
  readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
498
505
  readonly id: Schema.String;
506
+ readonly stroke: Schema.optionalKey<Schema.Literals<readonly ["dashed"]>>;
499
507
  readonly from: Schema.Struct<{
500
508
  readonly x: Schema.Finite;
501
509
  readonly y: Schema.Finite;
@@ -3,7 +3,7 @@ import { hasUniquePositions, MathAxisRangeSchema, MathViewPaddingSchema, mathVis
3
3
  import { spaceBoundsIssues } from "#contracts/math/bounds";
4
4
  import { FormulaParameterSchema } from "#contracts/math/formula/field";
5
5
  import { formulaScopeIssues, parameterScope, spaceFormulaFields, } from "#contracts/math/formula/scope";
6
- import { MATH_LINE_MESSAGE, MATH_POLYLINE_MESSAGE, MATH_RAY_MESSAGE, MATH_SEGMENT_MESSAGE, MATH_VECTOR_MESSAGE, MathObjectFields, mathLabelAnchorFields, } from "#contracts/math/object";
6
+ import { MATH_LINE_MESSAGE, MATH_POLYLINE_MESSAGE, MATH_RAY_MESSAGE, MATH_SEGMENT_MESSAGE, MATH_VECTOR_MESSAGE, MathObjectFields, MathStrokeFields, mathLabelAnchorFields, } from "#contracts/math/object";
7
7
  import { spaceResolutionIssues } from "#contracts/math/resolution";
8
8
  import { SpaceSolidObjectSchemas } from "#contracts/math/solid";
9
9
  import { hasCoplanarArea } from "#contracts/math/vector";
@@ -16,6 +16,7 @@ const SpacePathSchema = Schema.TupleWithRest(Schema.Tuple([SpacePointSchema, Spa
16
16
  const SpaceShapeSchema = Schema.TupleWithRest(Schema.Tuple([SpacePointSchema, SpacePointSchema, SpacePointSchema]), [SpacePointSchema]);
17
17
  const SpaceLineObjectSchema = Schema.Struct({
18
18
  ...MathObjectFields,
19
+ ...MathStrokeFields,
19
20
  kind: Schema.Literal("line"),
20
21
  through: Schema.Tuple([SpacePointSchema, SpacePointSchema]),
21
22
  }).pipe(Schema.check(Schema.makeFilter(({ through: [from, to] }) => !sameSpacePoint(from, to), {
@@ -23,6 +24,7 @@ const SpaceLineObjectSchema = Schema.Struct({
23
24
  })));
24
25
  const SpaceRayObjectSchema = Schema.Struct({
25
26
  ...MathObjectFields,
27
+ ...MathStrokeFields,
26
28
  from: SpacePointSchema,
27
29
  kind: Schema.Literal("ray"),
28
30
  through: SpacePointSchema,
@@ -31,6 +33,7 @@ const SpaceRayObjectSchema = Schema.Struct({
31
33
  })));
32
34
  const SpaceSegmentObjectSchema = Schema.Struct({
33
35
  ...MathObjectFields,
36
+ ...MathStrokeFields,
34
37
  from: SpacePointSchema,
35
38
  kind: Schema.Literal("segment"),
36
39
  to: SpacePointSchema,
@@ -51,6 +54,7 @@ const SpaceVectorObjectSchema = Schema.Struct({
51
54
  })));
52
55
  const SpacePolylineObjectSchema = Schema.Struct({
53
56
  ...MathObjectFields,
57
+ ...MathStrokeFields,
54
58
  kind: Schema.Literal("polyline"),
55
59
  vertices: SpacePathSchema,
56
60
  }).pipe(Schema.check(Schema.makeFilter(({ vertices }) => hasUniquePositions(vertices, sameSpacePoint), { message: MATH_POLYLINE_MESSAGE })));
@@ -1,3 +1,3 @@
1
- import { type SpacePoint } from "#contracts/math/base";
1
+ import type { SpacePoint } from "#contracts/math/base";
2
2
  /** Checks a space polygon is planar and has non-zero area. */
3
3
  export declare function hasCoplanarArea(vertices: readonly [SpacePoint, SpacePoint, SpacePoint, ...SpacePoint[]]): boolean;