@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.
- package/dist/assessment/document.d.ts +1 -1
- package/dist/assessment/document.js +1 -1
- package/dist/assessment/figure.d.ts +1 -1
- package/dist/assessment/figure.js +1 -1
- package/dist/assessment/fit.d.ts +3 -3
- package/dist/assessment/fit.js +3 -3
- package/dist/assessment/locales.d.ts +1 -1
- package/dist/assessment/scoring.d.ts +1 -1
- package/dist/assessment/scoring.js +1 -1
- package/dist/cache/content.d.ts +1 -1
- package/dist/cache/content.js +1 -1
- package/dist/content.d.ts +3 -2
- package/dist/graph/identity.d.ts +1 -1
- package/dist/graph/identity.js +1 -1
- package/dist/math/boundary.d.ts +9 -0
- package/dist/math/boundary.js +81 -0
- package/dist/math/bounds.d.ts +1 -1
- package/dist/math/collision.d.ts +1 -1
- package/dist/math/coordinate.d.ts +6 -5
- package/dist/math/coordinate.js +2 -2
- package/dist/math/curve.d.ts +1 -0
- package/dist/math/curve.js +4 -2
- package/dist/math/formula/affine.d.ts +22 -0
- package/dist/math/formula/affine.js +79 -0
- package/dist/math/formula/compile.d.ts +1 -1
- package/dist/math/formula/compile.js +1 -1
- package/dist/math/formula/contour.d.ts +1 -1
- package/dist/math/formula/contour.js +28 -13
- package/dist/math/formula/field.js +1 -1
- package/dist/math/formula/mesh.d.ts +1 -1
- package/dist/math/formula/mesh.js +1 -1
- package/dist/math/formula/names.d.ts +1 -1
- package/dist/math/formula/names.js +1 -1
- package/dist/math/formula/parse.d.ts +1 -1
- package/dist/math/formula/parse.js +1 -1
- package/dist/math/formula/plane.d.ts +2 -2
- package/dist/math/formula/plane.js +3 -3
- package/dist/math/formula/reader.d.ts +2 -1
- package/dist/math/formula/reader.js +1 -1
- package/dist/math/formula/region.d.ts +2 -2
- package/dist/math/formula/region.js +3 -3
- package/dist/math/formula/sample.d.ts +1 -1
- package/dist/math/formula/scan.d.ts +1 -1
- package/dist/math/formula/scan.js +1 -1
- package/dist/math/formula/slider.d.ts +2 -2
- package/dist/math/formula/slider.js +1 -1
- package/dist/math/formula/space.d.ts +1 -1
- package/dist/math/formula/space.js +1 -1
- package/dist/math/object.d.ts +12 -0
- package/dist/math/object.js +11 -0
- package/dist/math/plane.d.ts +10 -0
- package/dist/math/plane.js +7 -1
- package/dist/math/precision.d.ts +1 -1
- package/dist/math/precision.js +1 -1
- package/dist/math/resolution.js +1 -1
- package/dist/math/scene.d.ts +2 -2
- package/dist/math/space.d.ts +8 -0
- package/dist/math/space.js +5 -1
- package/dist/math/vector.d.ts +1 -1
- package/dist/math/visual.d.ts +239 -212
- package/dist/preview/spec.js +1 -1
- package/dist/program/curriculum.d.ts +1 -1
- package/dist/program/curriculum.js +1 -1
- package/dist/program/snapshot/digest.d.ts +1 -1
- package/dist/program/snapshot/digest.js +2 -2
- package/dist/program/snapshot/hash.d.ts +2 -2
- package/dist/projection/digest.d.ts +1 -1
- package/dist/projection/digest.js +1 -1
- package/dist/projection/hash.js +1 -1
- package/dist/projection/material.d.ts +1 -1
- package/dist/projection/material.js +1 -1
- package/dist/projection/verify.js +1 -1
- package/dist/quran/identity.d.ts +2 -1
- package/dist/quran/provenance.d.ts +2 -2
- package/dist/quran/provenance.js +1 -1
- package/dist/quran/snapshot/hash.d.ts +1 -1
- package/dist/quran/snapshot/row/hash.d.ts +1 -1
- package/dist/quran/snapshot/row/hash.js +1 -1
- package/dist/quran/snapshot/spec.js +1 -1
- package/dist/quran/source.d.ts +2 -2
- package/dist/release/current/evidence.d.ts +1 -1
- package/dist/release/current/evidence.js +1 -1
- package/dist/release/current/state.d.ts +1 -1
- package/dist/release/current/state.js +1 -1
- package/dist/release/head.js +1 -1
- package/dist/release/items.d.ts +1 -1
- package/dist/release/items.js +1 -1
- package/dist/release/policy.d.ts +1 -1
- package/dist/release/policy.js +1 -1
- package/dist/release/result/digest.d.ts +3 -3
- package/dist/release/result/digest.js +2 -2
- package/dist/release/rollback/digest.d.ts +1 -1
- package/dist/release/rollback/digest.js +1 -1
- package/dist/release/route/digest.d.ts +1 -1
- package/dist/release/route/digest.js +1 -1
- package/dist/release/snapshot/evidence/assessment.d.ts +1 -1
- package/dist/release/snapshot/evidence/assessment.js +1 -1
- package/dist/release/snapshot/evidence/program.d.ts +1 -1
- package/dist/release/snapshot/evidence/program.js +1 -1
- package/dist/release/snapshot/evidence/quran.d.ts +1 -1
- package/dist/release/snapshot/evidence/quran.js +1 -1
- package/dist/release/snapshot/evidence/requirement.d.ts +3 -2
- package/dist/release/snapshot/evidence/requirement.js +1 -1
- package/dist/release/snapshot/spec.d.ts +2 -2
- package/dist/release/snapshot/spec.js +1 -1
- package/dist/release/snapshot/verify.d.ts +1 -1
- package/dist/release/snapshot/verify.js +1 -1
- package/dist/release/spec.d.ts +1 -1
- package/dist/release/verify.d.ts +1 -1
- package/dist/release/verify.js +1 -1
- package/dist/renderer/compatibility.d.ts +1 -1
- package/dist/renderer/compatibility.js +2 -2
- package/dist/renderer/contract.d.ts +1 -1
- package/dist/renderer/contract.js +1 -1
- package/dist/runtime/spec.js +2 -2
- package/dist/signature/spec.d.ts +3 -2
- package/dist/signature/verify.d.ts +2 -1
- package/dist/transport/request.d.ts +1 -1
- package/dist/visual/base/math.d.ts +79 -1
- package/dist/visual/base/math.js +31 -3
- package/dist/visual/base/media.d.ts +68 -1
- package/dist/visual/biology/bacteria.d.ts +269 -1
- package/dist/visual/biology/bacteria.js +1 -1
- package/dist/visual/biology/cell.d.ts +202 -1
- package/dist/visual/biology/climate.d.ts +202 -1
- package/dist/visual/biology/climate.js +1 -1
- package/dist/visual/biology/ecology.d.ts +269 -1
- package/dist/visual/biology/physiology.d.ts +202 -1
- package/dist/visual/biology/physiology.js +1 -1
- package/dist/visual/biology/plant.d.ts +336 -1
- package/dist/visual/biology/plant.js +1 -1
- package/dist/visual/biology.d.ts +1 -1
- package/dist/visual/card.d.ts +79 -1
- package/dist/visual/card.js +18 -2
- package/dist/visual/catalog.d.ts +14164 -2
- package/dist/visual/catalog.js +4 -0
- package/dist/visual/chemistry/atom.d.ts +202 -1
- package/dist/visual/chemistry/atom.js +1 -1
- package/dist/visual/chemistry/balance.d.ts +336 -1
- package/dist/visual/chemistry/balance.js +1 -1
- package/dist/visual/chemistry/bonding.d.ts +336 -1
- package/dist/visual/chemistry/discovery.d.ts +470 -1
- package/dist/visual/chemistry/electrochemistry.d.ts +135 -1
- package/dist/visual/chemistry/electrochemistry.js +1 -1
- package/dist/visual/chemistry/electron.d.ts +135 -1
- package/dist/visual/chemistry/electron.js +1 -1
- package/dist/visual/chemistry/laws.d.ts +269 -1
- package/dist/visual/chemistry/laws.js +1 -1
- package/dist/visual/chemistry/particles.d.ts +336 -1
- package/dist/visual/chemistry/periodic.d.ts +135 -1
- package/dist/visual/chemistry/periodic.js +1 -1
- package/dist/visual/chemistry/rate.d.ts +68 -1
- package/dist/visual/chemistry/rate.js +1 -1
- package/dist/visual/chemistry/reaction.d.ts +202 -1
- package/dist/visual/chemistry/reaction.js +1 -1
- package/dist/visual/chemistry/titration.d.ts +68 -1
- package/dist/visual/chemistry/titration.js +1 -1
- package/dist/visual/length.d.ts +79 -0
- package/dist/visual/length.js +37 -0
- package/dist/visual/mathematics/chance.d.ts +258 -0
- package/dist/visual/mathematics/chance.js +117 -0
- package/dist/visual/mathematics/chart.d.ts +68 -1
- package/dist/visual/mathematics/charts.d.ts +336 -1
- package/dist/visual/mathematics/function.d.ts +202 -1
- package/dist/visual/mathematics/numeral.d.ts +170 -0
- package/dist/visual/mathematics/numeral.js +85 -0
- package/dist/visual/physics/braking.d.ts +269 -1
- package/dist/visual/physics/braking.js +1 -1
- package/dist/visual/physics/circuit.d.ts +269 -1
- package/dist/visual/physics/circular.d.ts +135 -1
- package/dist/visual/physics/circular.js +1 -1
- package/dist/visual/physics/dynamics.d.ts +470 -1
- package/dist/visual/physics/dynamics.js +1 -1
- package/dist/visual/physics/efficiency.d.ts +403 -1
- package/dist/visual/physics/efficiency.js +1 -1
- package/dist/visual/physics/electronics.d.ts +202 -1
- package/dist/visual/physics/falling.d.ts +269 -1
- package/dist/visual/physics/falling.js +1 -1
- package/dist/visual/physics/field.d.ts +202 -1
- package/dist/visual/physics/fluid.d.ts +269 -1
- package/dist/visual/physics/fluid.js +1 -1
- package/dist/visual/physics/force.d.ts +336 -1
- package/dist/visual/physics/gravity.d.ts +135 -1
- package/dist/visual/physics/heat.d.ts +202 -1
- package/dist/visual/physics/heat.js +1 -1
- package/dist/visual/physics/instrument.d.ts +470 -1
- package/dist/visual/physics/light.d.ts +269 -1
- package/dist/visual/physics/light.js +1 -1
- package/dist/visual/physics/measurement.d.ts +269 -1
- package/dist/visual/physics/measurement.js +1 -1
- package/dist/visual/physics/motion.d.ts +403 -1
- package/dist/visual/physics/nuclear.d.ts +202 -1
- package/dist/visual/physics/parabolic.d.ts +68 -1
- package/dist/visual/physics/position.d.ts +403 -1
- package/dist/visual/physics/position.js +1 -1
- package/dist/visual/physics/power.d.ts +537 -1
- package/dist/visual/physics/power.js +1 -1
- package/dist/visual/physics/precision.d.ts +470 -1
- package/dist/visual/physics/precision.js +1 -1
- package/dist/visual/physics/product.d.ts +269 -1
- package/dist/visual/physics/reading.d.ts +202 -1
- package/dist/visual/physics/reading.js +1 -1
- package/dist/visual/physics/record.d.ts +135 -1
- package/dist/visual/physics/record.js +1 -1
- package/dist/visual/physics/relative.d.ts +202 -1
- package/dist/visual/physics/relative.js +1 -1
- package/dist/visual/physics/solar.d.ts +403 -1
- package/dist/visual/physics/solar.js +1 -1
- package/dist/visual/physics/vector.d.ts +336 -1
- package/dist/visual/physics/vector.js +1 -1
- package/dist/visual/physics/velocity.d.ts +470 -1
- package/dist/visual/physics/wave.d.ts +269 -1
- package/dist/visual/politics.d.ts +403 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
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
|
|
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 {
|
|
2
|
-
import {
|
|
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
|
|
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 {
|
|
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
|
|
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. */
|
package/dist/math/object.d.ts
CHANGED
|
@@ -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.
|
package/dist/math/object.js
CHANGED
|
@@ -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.
|
package/dist/math/plane.d.ts
CHANGED
|
@@ -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;
|
package/dist/math/plane.js
CHANGED
|
@@ -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
|
])));
|
package/dist/math/precision.d.ts
CHANGED
|
@@ -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 {
|
|
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;
|
package/dist/math/precision.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BigDecimal, Array as EffectArray, Record as Rec } from "effect";
|
|
2
|
-
import { infinitePathInterval
|
|
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);
|
package/dist/math/resolution.js
CHANGED
|
@@ -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
|
|
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";
|
package/dist/math/scene.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BigDecimal } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { ScenePath } from "#contracts/math/coordinate";
|
|
3
3
|
import type { PlaneLabelAnchor, PlaneMathFrame, PlaneMathObject } from "#contracts/math/plane";
|
|
4
|
-
import {
|
|
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;
|
package/dist/math/space.d.ts
CHANGED
|
@@ -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;
|
package/dist/math/space.js
CHANGED
|
@@ -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 })));
|
package/dist/math/vector.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
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;
|