@nakafa/aksara-contracts 8.4.0 → 8.8.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.
- 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/hash/sha256.d.ts +16 -0
- package/dist/hash/sha256.js +164 -0
- package/dist/hash/stream.d.ts +7 -5
- package/dist/hash/stream.js +13 -18
- package/dist/math/boundary.js +3 -22
- 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/edge.d.ts +11 -0
- package/dist/math/edge.js +74 -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 +1 -1
- 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/graph.d.ts +9 -0
- package/dist/math/graph.js +66 -0
- package/dist/math/plane.js +6 -0
- 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/shape.d.ts +392 -0
- package/dist/math/shape.js +59 -0
- package/dist/math/straight.d.ts +13 -0
- package/dist/math/straight.js +26 -0
- package/dist/math/vector.d.ts +1 -1
- 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 +1 -1
- package/dist/visual/base/media.d.ts +1 -1
- package/dist/visual/biology/bacteria.d.ts +1 -1
- package/dist/visual/biology/bacteria.js +1 -1
- package/dist/visual/biology/blood.d.ts +91 -0
- package/dist/visual/biology/blood.js +55 -0
- package/dist/visual/biology/cell.d.ts +1 -1
- package/dist/visual/biology/climate.d.ts +1 -1
- package/dist/visual/biology/climate.js +1 -1
- package/dist/visual/biology/ecology.d.ts +1 -1
- package/dist/visual/biology/heart.d.ts +92 -0
- package/dist/visual/biology/heart.js +54 -0
- package/dist/visual/biology/mitochondrion.d.ts +91 -0
- package/dist/visual/biology/mitochondrion.js +45 -0
- package/dist/visual/biology/muscle.d.ts +103 -0
- package/dist/visual/biology/muscle.js +62 -0
- package/dist/visual/biology/neuron.d.ts +97 -0
- package/dist/visual/biology/neuron.js +48 -0
- package/dist/visual/biology/paddy.d.ts +100 -0
- package/dist/visual/biology/paddy.js +54 -0
- package/dist/visual/biology/physiology.d.ts +1 -1
- package/dist/visual/biology/physiology.js +1 -1
- package/dist/visual/biology/plant.d.ts +1 -1
- package/dist/visual/biology/plant.js +1 -1
- package/dist/visual/biology/synapse.d.ts +101 -0
- package/dist/visual/biology/synapse.js +46 -0
- package/dist/visual/biology/vessel.d.ts +104 -0
- package/dist/visual/biology/vessel.js +60 -0
- package/dist/visual/biology/yeast.d.ts +108 -0
- package/dist/visual/biology/yeast.js +61 -0
- package/dist/visual/biology.d.ts +1 -1
- package/dist/visual/catalog.d.ts +2177 -778
- package/dist/visual/catalog.js +28 -0
- package/dist/visual/chemistry/atom.d.ts +1 -1
- package/dist/visual/chemistry/atom.js +1 -1
- package/dist/visual/chemistry/balance.d.ts +1 -1
- package/dist/visual/chemistry/balance.js +1 -1
- package/dist/visual/chemistry/bonding.d.ts +1 -1
- package/dist/visual/chemistry/discovery.d.ts +1 -1
- package/dist/visual/chemistry/electrochemistry.d.ts +1 -1
- package/dist/visual/chemistry/electrochemistry.js +1 -1
- package/dist/visual/chemistry/electron.d.ts +1 -1
- package/dist/visual/chemistry/electron.js +1 -1
- package/dist/visual/chemistry/laws.d.ts +1 -1
- package/dist/visual/chemistry/laws.js +1 -1
- package/dist/visual/chemistry/particles.d.ts +1 -1
- package/dist/visual/chemistry/periodic.d.ts +1 -1
- package/dist/visual/chemistry/periodic.js +1 -1
- package/dist/visual/chemistry/rate.d.ts +1 -1
- package/dist/visual/chemistry/rate.js +1 -1
- package/dist/visual/chemistry/reaction.d.ts +1 -1
- package/dist/visual/chemistry/reaction.js +1 -1
- package/dist/visual/chemistry/titration.d.ts +1 -1
- package/dist/visual/chemistry/titration.js +1 -1
- package/dist/visual/mathematics/chance.d.ts +1 -1
- package/dist/visual/mathematics/chance.js +1 -1
- package/dist/visual/mathematics/chart.d.ts +1 -1
- package/dist/visual/mathematics/charts.d.ts +1 -1
- package/dist/visual/mathematics/function.d.ts +1 -1
- package/dist/visual/mathematics/journey.d.ts +118 -0
- package/dist/visual/mathematics/journey.js +125 -0
- package/dist/visual/mathematics/logic.d.ts +90 -0
- package/dist/visual/mathematics/logic.js +49 -0
- package/dist/visual/mathematics/network.d.ts +101 -0
- package/dist/visual/mathematics/network.js +97 -0
- package/dist/visual/mathematics/numeral.d.ts +82 -1
- package/dist/visual/mathematics/numeral.js +49 -1
- package/dist/visual/mathematics/sets.d.ts +92 -0
- package/dist/visual/mathematics/sets.js +95 -0
- package/dist/visual/physics/braking.d.ts +1 -1
- package/dist/visual/physics/braking.js +1 -1
- package/dist/visual/physics/circuit.d.ts +1 -1
- package/dist/visual/physics/circular.d.ts +1 -1
- package/dist/visual/physics/circular.js +1 -1
- package/dist/visual/physics/dynamics.d.ts +1 -1
- package/dist/visual/physics/dynamics.js +1 -1
- package/dist/visual/physics/efficiency.d.ts +1 -1
- package/dist/visual/physics/efficiency.js +1 -1
- package/dist/visual/physics/electronics.d.ts +1 -1
- package/dist/visual/physics/falling.d.ts +1 -1
- package/dist/visual/physics/falling.js +1 -1
- package/dist/visual/physics/field.d.ts +1 -1
- package/dist/visual/physics/fluid.d.ts +1 -1
- package/dist/visual/physics/fluid.js +1 -1
- package/dist/visual/physics/force.d.ts +1 -1
- package/dist/visual/physics/gravity.d.ts +1 -1
- package/dist/visual/physics/heat.d.ts +1 -1
- package/dist/visual/physics/heat.js +1 -1
- package/dist/visual/physics/instrument.d.ts +1 -1
- package/dist/visual/physics/light.d.ts +1 -1
- package/dist/visual/physics/light.js +1 -1
- package/dist/visual/physics/measurement.d.ts +1 -1
- package/dist/visual/physics/measurement.js +1 -1
- package/dist/visual/physics/motion.d.ts +1 -1
- package/dist/visual/physics/nuclear.d.ts +1 -1
- package/dist/visual/physics/parabolic.d.ts +1 -1
- package/dist/visual/physics/position.d.ts +1 -1
- package/dist/visual/physics/position.js +1 -1
- package/dist/visual/physics/power.d.ts +1 -1
- package/dist/visual/physics/power.js +1 -1
- package/dist/visual/physics/precision.d.ts +1 -1
- package/dist/visual/physics/precision.js +1 -1
- package/dist/visual/physics/product.d.ts +1 -1
- package/dist/visual/physics/reading.d.ts +1 -1
- package/dist/visual/physics/reading.js +1 -1
- package/dist/visual/physics/record.d.ts +1 -1
- package/dist/visual/physics/record.js +1 -1
- package/dist/visual/physics/relative.d.ts +1 -1
- package/dist/visual/physics/relative.js +1 -1
- package/dist/visual/physics/solar.d.ts +1 -1
- package/dist/visual/physics/solar.js +1 -1
- package/dist/visual/physics/thermodynamics.d.ts +117 -0
- package/dist/visual/physics/thermodynamics.js +95 -0
- package/dist/visual/physics/vector.d.ts +1 -1
- package/dist/visual/physics/vector.js +1 -1
- package/dist/visual/physics/velocity.d.ts +1 -1
- package/dist/visual/physics/wave.d.ts +1 -1
- package/dist/visual/politics.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import type { Schema } from "effect";
|
|
2
|
+
import type { PlaneMathFrame, PlaneMathObject, PlaneMathView } from "#contracts/math/plane";
|
|
3
|
+
/**
|
|
4
|
+
* The plane objects whose meaning is their shape: a circle is round, an arc's
|
|
5
|
+
* angle is true, a polygon's sides keep their proportion, and a vector or a
|
|
6
|
+
* ray points the way it is drawn. A parametric curve counts, because circles
|
|
7
|
+
* and angle marks are drawn with it. A scene that draws one keeps one scale on
|
|
8
|
+
* both axes; any other plane scene is a graph, which may scale each axis on
|
|
9
|
+
* its own.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PLANE_FIGURE_KINDS: readonly ["arc", "circle", "implicit", "parametric", "polar", "polygon", "ray", "vector"];
|
|
12
|
+
/** Whether a plane scene keeps one scale on both axes, because it draws a figure. */
|
|
13
|
+
export declare function keepsShape(objects: readonly PlaneMathObject[]): objects is readonly [{
|
|
14
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly kind: "parametric";
|
|
17
|
+
readonly parameter: {
|
|
18
|
+
readonly max: number;
|
|
19
|
+
readonly min: number;
|
|
20
|
+
};
|
|
21
|
+
readonly x: string;
|
|
22
|
+
readonly y: string;
|
|
23
|
+
} | {
|
|
24
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly angle: {
|
|
27
|
+
readonly max: number;
|
|
28
|
+
readonly min: number;
|
|
29
|
+
};
|
|
30
|
+
readonly kind: "polar";
|
|
31
|
+
readonly radius: string;
|
|
32
|
+
} | {
|
|
33
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly equation: string;
|
|
36
|
+
readonly kind: "implicit";
|
|
37
|
+
} | {
|
|
38
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
39
|
+
readonly id: string;
|
|
40
|
+
readonly inequalities: readonly [string, ...string[]];
|
|
41
|
+
readonly kind: "region";
|
|
42
|
+
} | {
|
|
43
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly kind: "marker";
|
|
46
|
+
readonly x: string;
|
|
47
|
+
readonly y: string;
|
|
48
|
+
} | {
|
|
49
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
50
|
+
readonly id: string;
|
|
51
|
+
readonly kind: "path";
|
|
52
|
+
readonly points: readonly {
|
|
53
|
+
readonly x: string;
|
|
54
|
+
readonly y: string;
|
|
55
|
+
}[];
|
|
56
|
+
} | {
|
|
57
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
58
|
+
readonly id: string;
|
|
59
|
+
readonly kind: "loop";
|
|
60
|
+
readonly points: readonly {
|
|
61
|
+
readonly x: string;
|
|
62
|
+
readonly y: string;
|
|
63
|
+
}[];
|
|
64
|
+
} | {
|
|
65
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
66
|
+
readonly id: string;
|
|
67
|
+
readonly at: {
|
|
68
|
+
readonly x: number;
|
|
69
|
+
readonly y: number;
|
|
70
|
+
};
|
|
71
|
+
readonly kind: "point";
|
|
72
|
+
} | {
|
|
73
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
74
|
+
readonly id: string;
|
|
75
|
+
readonly from: {
|
|
76
|
+
readonly x: number;
|
|
77
|
+
readonly y: number;
|
|
78
|
+
};
|
|
79
|
+
readonly kind: "vector";
|
|
80
|
+
readonly to: {
|
|
81
|
+
readonly x: number;
|
|
82
|
+
readonly y: number;
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
85
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
86
|
+
readonly id: string;
|
|
87
|
+
readonly kind: "polygon";
|
|
88
|
+
readonly vertices: readonly [{
|
|
89
|
+
readonly x: number;
|
|
90
|
+
readonly y: number;
|
|
91
|
+
}, {
|
|
92
|
+
readonly x: number;
|
|
93
|
+
readonly y: number;
|
|
94
|
+
}, {
|
|
95
|
+
readonly x: number;
|
|
96
|
+
readonly y: number;
|
|
97
|
+
}, ...{
|
|
98
|
+
readonly x: number;
|
|
99
|
+
readonly y: number;
|
|
100
|
+
}[]];
|
|
101
|
+
} | {
|
|
102
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
103
|
+
readonly id: string;
|
|
104
|
+
readonly center: {
|
|
105
|
+
readonly x: number;
|
|
106
|
+
readonly y: number;
|
|
107
|
+
};
|
|
108
|
+
readonly kind: "circle";
|
|
109
|
+
readonly radius: number;
|
|
110
|
+
} | {
|
|
111
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
112
|
+
readonly id: string;
|
|
113
|
+
readonly center: {
|
|
114
|
+
readonly x: number;
|
|
115
|
+
readonly y: number;
|
|
116
|
+
};
|
|
117
|
+
readonly kind: "arc";
|
|
118
|
+
readonly radius: number;
|
|
119
|
+
readonly startDegrees: number;
|
|
120
|
+
readonly sweepDegrees: number;
|
|
121
|
+
} | {
|
|
122
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
123
|
+
readonly id: string;
|
|
124
|
+
readonly coefficients: {
|
|
125
|
+
readonly a: number;
|
|
126
|
+
readonly b: number;
|
|
127
|
+
readonly c: number;
|
|
128
|
+
};
|
|
129
|
+
readonly domain: {
|
|
130
|
+
readonly max: number;
|
|
131
|
+
readonly min: number;
|
|
132
|
+
};
|
|
133
|
+
readonly inputAxis: "x" | "y";
|
|
134
|
+
readonly kind: "quadratic";
|
|
135
|
+
} | {
|
|
136
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
137
|
+
readonly id: string;
|
|
138
|
+
readonly stroke?: "dashed";
|
|
139
|
+
readonly domain?: {
|
|
140
|
+
readonly max: number;
|
|
141
|
+
readonly min: number;
|
|
142
|
+
};
|
|
143
|
+
readonly formula: string;
|
|
144
|
+
readonly inputAxis?: "x" | "y";
|
|
145
|
+
readonly kind: "function";
|
|
146
|
+
} | {
|
|
147
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
148
|
+
readonly id: string;
|
|
149
|
+
readonly stroke?: "dashed";
|
|
150
|
+
readonly kind: "line";
|
|
151
|
+
readonly through: readonly [{
|
|
152
|
+
readonly x: number;
|
|
153
|
+
readonly y: number;
|
|
154
|
+
}, {
|
|
155
|
+
readonly x: number;
|
|
156
|
+
readonly y: number;
|
|
157
|
+
}];
|
|
158
|
+
} | {
|
|
159
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
160
|
+
readonly id: string;
|
|
161
|
+
readonly stroke?: "dashed";
|
|
162
|
+
readonly from: {
|
|
163
|
+
readonly x: number;
|
|
164
|
+
readonly y: number;
|
|
165
|
+
};
|
|
166
|
+
readonly kind: "ray";
|
|
167
|
+
readonly through: {
|
|
168
|
+
readonly x: number;
|
|
169
|
+
readonly y: number;
|
|
170
|
+
};
|
|
171
|
+
} | {
|
|
172
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
173
|
+
readonly id: string;
|
|
174
|
+
readonly stroke?: "dashed";
|
|
175
|
+
readonly from: {
|
|
176
|
+
readonly x: number;
|
|
177
|
+
readonly y: number;
|
|
178
|
+
};
|
|
179
|
+
readonly kind: "segment";
|
|
180
|
+
readonly to: {
|
|
181
|
+
readonly x: number;
|
|
182
|
+
readonly y: number;
|
|
183
|
+
};
|
|
184
|
+
} | {
|
|
185
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
186
|
+
readonly id: string;
|
|
187
|
+
readonly stroke?: "dashed";
|
|
188
|
+
readonly kind: "polyline";
|
|
189
|
+
readonly vertices: readonly [{
|
|
190
|
+
readonly x: number;
|
|
191
|
+
readonly y: number;
|
|
192
|
+
}, {
|
|
193
|
+
readonly x: number;
|
|
194
|
+
readonly y: number;
|
|
195
|
+
}, ...{
|
|
196
|
+
readonly x: number;
|
|
197
|
+
readonly y: number;
|
|
198
|
+
}[]];
|
|
199
|
+
}, ...({
|
|
200
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
201
|
+
readonly id: string;
|
|
202
|
+
readonly kind: "parametric";
|
|
203
|
+
readonly parameter: {
|
|
204
|
+
readonly max: number;
|
|
205
|
+
readonly min: number;
|
|
206
|
+
};
|
|
207
|
+
readonly x: string;
|
|
208
|
+
readonly y: string;
|
|
209
|
+
} | {
|
|
210
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
211
|
+
readonly id: string;
|
|
212
|
+
readonly angle: {
|
|
213
|
+
readonly max: number;
|
|
214
|
+
readonly min: number;
|
|
215
|
+
};
|
|
216
|
+
readonly kind: "polar";
|
|
217
|
+
readonly radius: string;
|
|
218
|
+
} | {
|
|
219
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
220
|
+
readonly id: string;
|
|
221
|
+
readonly equation: string;
|
|
222
|
+
readonly kind: "implicit";
|
|
223
|
+
} | {
|
|
224
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
225
|
+
readonly id: string;
|
|
226
|
+
readonly inequalities: readonly [string, ...string[]];
|
|
227
|
+
readonly kind: "region";
|
|
228
|
+
} | {
|
|
229
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
230
|
+
readonly id: string;
|
|
231
|
+
readonly kind: "marker";
|
|
232
|
+
readonly x: string;
|
|
233
|
+
readonly y: string;
|
|
234
|
+
} | {
|
|
235
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
236
|
+
readonly id: string;
|
|
237
|
+
readonly kind: "path";
|
|
238
|
+
readonly points: readonly {
|
|
239
|
+
readonly x: string;
|
|
240
|
+
readonly y: string;
|
|
241
|
+
}[];
|
|
242
|
+
} | {
|
|
243
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
244
|
+
readonly id: string;
|
|
245
|
+
readonly kind: "loop";
|
|
246
|
+
readonly points: readonly {
|
|
247
|
+
readonly x: string;
|
|
248
|
+
readonly y: string;
|
|
249
|
+
}[];
|
|
250
|
+
} | {
|
|
251
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
252
|
+
readonly id: string;
|
|
253
|
+
readonly at: {
|
|
254
|
+
readonly x: number;
|
|
255
|
+
readonly y: number;
|
|
256
|
+
};
|
|
257
|
+
readonly kind: "point";
|
|
258
|
+
} | {
|
|
259
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
260
|
+
readonly id: string;
|
|
261
|
+
readonly from: {
|
|
262
|
+
readonly x: number;
|
|
263
|
+
readonly y: number;
|
|
264
|
+
};
|
|
265
|
+
readonly kind: "vector";
|
|
266
|
+
readonly to: {
|
|
267
|
+
readonly x: number;
|
|
268
|
+
readonly y: number;
|
|
269
|
+
};
|
|
270
|
+
} | {
|
|
271
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
272
|
+
readonly id: string;
|
|
273
|
+
readonly kind: "polygon";
|
|
274
|
+
readonly vertices: readonly [{
|
|
275
|
+
readonly x: number;
|
|
276
|
+
readonly y: number;
|
|
277
|
+
}, {
|
|
278
|
+
readonly x: number;
|
|
279
|
+
readonly y: number;
|
|
280
|
+
}, {
|
|
281
|
+
readonly x: number;
|
|
282
|
+
readonly y: number;
|
|
283
|
+
}, ...{
|
|
284
|
+
readonly x: number;
|
|
285
|
+
readonly y: number;
|
|
286
|
+
}[]];
|
|
287
|
+
} | {
|
|
288
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
289
|
+
readonly id: string;
|
|
290
|
+
readonly center: {
|
|
291
|
+
readonly x: number;
|
|
292
|
+
readonly y: number;
|
|
293
|
+
};
|
|
294
|
+
readonly kind: "circle";
|
|
295
|
+
readonly radius: number;
|
|
296
|
+
} | {
|
|
297
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
298
|
+
readonly id: string;
|
|
299
|
+
readonly center: {
|
|
300
|
+
readonly x: number;
|
|
301
|
+
readonly y: number;
|
|
302
|
+
};
|
|
303
|
+
readonly kind: "arc";
|
|
304
|
+
readonly radius: number;
|
|
305
|
+
readonly startDegrees: number;
|
|
306
|
+
readonly sweepDegrees: number;
|
|
307
|
+
} | {
|
|
308
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
309
|
+
readonly id: string;
|
|
310
|
+
readonly coefficients: {
|
|
311
|
+
readonly a: number;
|
|
312
|
+
readonly b: number;
|
|
313
|
+
readonly c: number;
|
|
314
|
+
};
|
|
315
|
+
readonly domain: {
|
|
316
|
+
readonly max: number;
|
|
317
|
+
readonly min: number;
|
|
318
|
+
};
|
|
319
|
+
readonly inputAxis: "x" | "y";
|
|
320
|
+
readonly kind: "quadratic";
|
|
321
|
+
} | {
|
|
322
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
323
|
+
readonly id: string;
|
|
324
|
+
readonly stroke?: "dashed";
|
|
325
|
+
readonly domain?: {
|
|
326
|
+
readonly max: number;
|
|
327
|
+
readonly min: number;
|
|
328
|
+
};
|
|
329
|
+
readonly formula: string;
|
|
330
|
+
readonly inputAxis?: "x" | "y";
|
|
331
|
+
readonly kind: "function";
|
|
332
|
+
} | {
|
|
333
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
334
|
+
readonly id: string;
|
|
335
|
+
readonly stroke?: "dashed";
|
|
336
|
+
readonly kind: "line";
|
|
337
|
+
readonly through: readonly [{
|
|
338
|
+
readonly x: number;
|
|
339
|
+
readonly y: number;
|
|
340
|
+
}, {
|
|
341
|
+
readonly x: number;
|
|
342
|
+
readonly y: number;
|
|
343
|
+
}];
|
|
344
|
+
} | {
|
|
345
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
346
|
+
readonly id: string;
|
|
347
|
+
readonly stroke?: "dashed";
|
|
348
|
+
readonly from: {
|
|
349
|
+
readonly x: number;
|
|
350
|
+
readonly y: number;
|
|
351
|
+
};
|
|
352
|
+
readonly kind: "ray";
|
|
353
|
+
readonly through: {
|
|
354
|
+
readonly x: number;
|
|
355
|
+
readonly y: number;
|
|
356
|
+
};
|
|
357
|
+
} | {
|
|
358
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
359
|
+
readonly id: string;
|
|
360
|
+
readonly stroke?: "dashed";
|
|
361
|
+
readonly from: {
|
|
362
|
+
readonly x: number;
|
|
363
|
+
readonly y: number;
|
|
364
|
+
};
|
|
365
|
+
readonly kind: "segment";
|
|
366
|
+
readonly to: {
|
|
367
|
+
readonly x: number;
|
|
368
|
+
readonly y: number;
|
|
369
|
+
};
|
|
370
|
+
} | {
|
|
371
|
+
readonly appearance: "answer" | "construction" | "highlight" | "primary" | "reference" | "secondary" | "warning";
|
|
372
|
+
readonly id: string;
|
|
373
|
+
readonly stroke?: "dashed";
|
|
374
|
+
readonly kind: "polyline";
|
|
375
|
+
readonly vertices: readonly [{
|
|
376
|
+
readonly x: number;
|
|
377
|
+
readonly y: number;
|
|
378
|
+
}, {
|
|
379
|
+
readonly x: number;
|
|
380
|
+
readonly y: number;
|
|
381
|
+
}, ...{
|
|
382
|
+
readonly x: number;
|
|
383
|
+
readonly y: number;
|
|
384
|
+
}[]];
|
|
385
|
+
})[]];
|
|
386
|
+
/**
|
|
387
|
+
* Guardrail G1: the frame of a plane scene that keeps one scale is between
|
|
388
|
+
* 0.7 and 2 times as wide as it is tall, padding included. The frame is only
|
|
389
|
+
* the region the figure teaches, and the world continues past it, so a frame
|
|
390
|
+
* stretched to reach a far point only shrinks the figure.
|
|
391
|
+
*/
|
|
392
|
+
export declare function figureAspectIssues(frame: PlaneMathFrame, objects: readonly PlaneMathObject[], view: PlaneMathView): readonly Schema.FilterIssue[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Array as Arr } from "effect";
|
|
2
|
+
/**
|
|
3
|
+
* The plane objects whose meaning is their shape: a circle is round, an arc's
|
|
4
|
+
* angle is true, a polygon's sides keep their proportion, and a vector or a
|
|
5
|
+
* ray points the way it is drawn. A parametric curve counts, because circles
|
|
6
|
+
* and angle marks are drawn with it. A scene that draws one keeps one scale on
|
|
7
|
+
* both axes; any other plane scene is a graph, which may scale each axis on
|
|
8
|
+
* its own.
|
|
9
|
+
*/
|
|
10
|
+
export const PLANE_FIGURE_KINDS = [
|
|
11
|
+
"arc",
|
|
12
|
+
"circle",
|
|
13
|
+
"implicit",
|
|
14
|
+
"parametric",
|
|
15
|
+
"polar",
|
|
16
|
+
"polygon",
|
|
17
|
+
"ray",
|
|
18
|
+
"vector",
|
|
19
|
+
];
|
|
20
|
+
/** Whether a plane scene keeps one scale on both axes, because it draws a figure. */
|
|
21
|
+
export function keepsShape(objects) {
|
|
22
|
+
return Arr.some(objects, ({ kind }) => Arr.contains(PLANE_FIGURE_KINDS, kind));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The aspects, wide over tall and padding included, between which a frame
|
|
26
|
+
* kept at one scale fills a card on a phone and on a desk: a wider frame
|
|
27
|
+
* shrinks the figure to a strip, a taller one to a column.
|
|
28
|
+
*/
|
|
29
|
+
const FIGURE_ASPECT = { max: 2, min: 0.7 };
|
|
30
|
+
/** A number of a frame's message, to two decimals at most. */
|
|
31
|
+
function short(value) {
|
|
32
|
+
return String(Math.round(value * 100) / 100);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Guardrail G1: the frame of a plane scene that keeps one scale is between
|
|
36
|
+
* 0.7 and 2 times as wide as it is tall, padding included. The frame is only
|
|
37
|
+
* the region the figure teaches, and the world continues past it, so a frame
|
|
38
|
+
* stretched to reach a far point only shrinks the figure.
|
|
39
|
+
*/
|
|
40
|
+
export function figureAspectIssues(frame, objects, view) {
|
|
41
|
+
if (!keepsShape(objects)) {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
const padding = view.padding ?? 0;
|
|
45
|
+
// Halves keep a frame as wide as the largest finite numbers from overflowing.
|
|
46
|
+
const halfWidth = frame.x.max / 2 - frame.x.min / 2 + padding;
|
|
47
|
+
const halfHeight = frame.y.max / 2 - frame.y.min / 2 + padding;
|
|
48
|
+
const aspect = halfWidth / halfHeight;
|
|
49
|
+
const width = 2 * halfWidth;
|
|
50
|
+
const height = 2 * halfHeight;
|
|
51
|
+
return aspect >= FIGURE_ASPECT.min && aspect <= FIGURE_ASPECT.max
|
|
52
|
+
? []
|
|
53
|
+
: [
|
|
54
|
+
{
|
|
55
|
+
issue: `Expected the frame of a scene that keeps one scale (it draws one of: ${Arr.join(PLANE_FIGURE_KINDS, ", ")}) to be between ${FIGURE_ASPECT.min} and ${FIGURE_ASPECT.max} times as wide as it is tall, padding included; this frame is ${short(width)} by ${short(height)} (${short(aspect)}). Frame the region the figure teaches: the grid, the axes and every unbounded object continue past it.`,
|
|
56
|
+
path: ["frame"],
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Option } from "effect";
|
|
2
|
+
import type { PlaneMathObject } from "#contracts/math/plane";
|
|
3
|
+
/**
|
|
4
|
+
* Two points of a straight object of a plane scene, which name the line it
|
|
5
|
+
* runs along: a line, ray, segment, or the graph of an affine formula.
|
|
6
|
+
*/
|
|
7
|
+
export declare function straightPoints(object: PlaneMathObject): Option.Option<readonly [{
|
|
8
|
+
readonly x: number;
|
|
9
|
+
readonly y: number;
|
|
10
|
+
}, {
|
|
11
|
+
readonly x: number;
|
|
12
|
+
readonly y: number;
|
|
13
|
+
}]>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Match, Option, Result } from "effect";
|
|
2
|
+
import { readAffine } from "#contracts/math/formula/affine";
|
|
3
|
+
import { readFormula } from "#contracts/math/formula/parse";
|
|
4
|
+
/** Two points of a graph that is a straight line: an affine formula in its input axis. */
|
|
5
|
+
function straightGraph(formula, input) {
|
|
6
|
+
return Result.getSuccess(readFormula(formula)).pipe(Option.flatMap((node) => readAffine(node, [input])), Option.map(({ constant, terms }) => {
|
|
7
|
+
const slope = terms[input] ?? 0;
|
|
8
|
+
/** The graph's point at one value of its input. */
|
|
9
|
+
const at = (value) => input === "x"
|
|
10
|
+
? { x: value, y: slope * value + constant }
|
|
11
|
+
: { x: slope * value + constant, y: value };
|
|
12
|
+
return [at(0), at(1)];
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Two points of a straight object of a plane scene, which name the line it
|
|
17
|
+
* runs along: a line, ray, segment, or the graph of an affine formula.
|
|
18
|
+
*/
|
|
19
|
+
export function straightPoints(object) {
|
|
20
|
+
return Match.value(object).pipe(Match.discriminators("kind")({
|
|
21
|
+
function: ({ formula, inputAxis = "x" }) => straightGraph(formula, inputAxis),
|
|
22
|
+
line: ({ through }) => Option.some(through),
|
|
23
|
+
ray: ({ from, through }) => Option.some([from, through]),
|
|
24
|
+
segment: ({ from, to }) => Option.some([from, to]),
|
|
25
|
+
}), Match.orElse(() => Option.none()));
|
|
26
|
+
}
|
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;
|
package/dist/preview/spec.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { GitCommitShaSchema, Sha256HashSchema } from "#contracts/ids";
|
|
3
3
|
import { PreviewArtifactSchema } from "#contracts/preview/artifact";
|
|
4
|
-
import { PreviewDocumentSchema
|
|
4
|
+
import { PreviewDocumentSchema } from "#contracts/preview/document";
|
|
5
5
|
import { PreviewRouteSchema } from "#contracts/preview/target";
|
|
6
6
|
/** Stable protocol implemented by the loopback-only authoring provider. */
|
|
7
7
|
export const LOCAL_PREVIEW_FORMAT = "aksara-local-preview";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { AppLocale } from "#contracts/locale";
|
|
3
3
|
/**
|
|
4
4
|
* Localized public route namespaces shared by projection and verification. A
|
|
5
5
|
* declared locale fails to compile until it names its own namespace here.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Array as Arr, Schema } from "effect";
|
|
2
2
|
import { CorpusSourcePathSchema, PublicPathSchema } from "#contracts/ids";
|
|
3
|
-
import { AppLocaleSchema
|
|
3
|
+
import { AppLocaleSchema } from "#contracts/locale";
|
|
4
4
|
import { MaterialDomainSchema } from "#contracts/material/domain";
|
|
5
5
|
import { LearningProgramKeySchema, ProgramNavigationIconKeySchema, ProgramNavigationLevelSchema, } from "#contracts/program/spec";
|
|
6
6
|
import { MaterialKeySchema } from "#contracts/projection/material";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Schema, Stream } from "effect";
|
|
2
2
|
import type { ActiveAppLocaleList } from "#contracts/locale";
|
|
3
|
-
import {
|
|
3
|
+
import type { ProgramSnapshotRow } from "#contracts/program/snapshot/row";
|
|
4
4
|
import type { ProgramCounts } from "#contracts/program/snapshot/spec";
|
|
5
5
|
declare const ProgramDigestError_base: Schema.Class<ProgramDigestError, Schema.TaggedStruct<"ProgramDigestError", {
|
|
6
6
|
readonly code: Schema.Literals<readonly ["count", "integrity", "key", "order", "parent", "program", "route", "root", "slug"]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Array as Arr, Effect, MutableHashMap, MutableHashSet, Option, Schema, Stream, } from "effect";
|
|
2
2
|
import { DigestStream } from "#contracts/hash/stream";
|
|
3
|
-
import { curriculumNamespace
|
|
3
|
+
import { curriculumNamespace } from "#contracts/program/curriculum";
|
|
4
4
|
import { verifyProgramSnapshotRowHash } from "#contracts/program/snapshot/hash";
|
|
5
|
-
import { canonicalizeProgramSnapshotRow
|
|
5
|
+
import { canonicalizeProgramSnapshotRow } from "#contracts/program/snapshot/row";
|
|
6
6
|
import { encodeJsonText } from "#contracts/text/json";
|
|
7
7
|
import { compareCodeUnits } from "#contracts/text/order";
|
|
8
8
|
const DIGEST_DOMAIN = "nakafa.aksara.program-rows";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { ProgramSnapshotRow } from "#contracts/program/snapshot/row";
|
|
3
|
+
import type { ProgramSnapshot, ProgramSnapshotFacts } from "#contracts/program/snapshot/spec";
|
|
4
4
|
/** Serializes current program facts in stable signed field order. */
|
|
5
5
|
export declare function canonicalizeProgramSnapshot(input: ProgramSnapshotFacts): string;
|
|
6
6
|
/** Creates the content-addressed identity of one complete program snapshot. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect, Stream } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { ContentProjection } from "#contracts/projection/spec";
|
|
3
3
|
/** Keeps the digest stream private while exposing only canonical counters. */
|
|
4
4
|
declare class ProjectionDigestState {
|
|
5
5
|
#private;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Stream } from "effect";
|
|
2
2
|
import { DigestStream } from "#contracts/hash/stream";
|
|
3
|
-
import { canonicalizeContentProjection
|
|
3
|
+
import { canonicalizeContentProjection } from "#contracts/projection/spec";
|
|
4
4
|
const CONTENT_PROJECTION_DIGEST_DOMAIN = "nakafa.aksara.content-projections";
|
|
5
5
|
/** Keeps the digest stream private while exposing only canonical counters. */
|
|
6
6
|
class ProjectionDigestState {
|
package/dist/projection/hash.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
2
|
import { hashText } from "#contracts/hash/text";
|
|
3
|
-
import { canonicalizeContentProjection
|
|
3
|
+
import { canonicalizeContentProjection } from "#contracts/projection/spec";
|
|
4
4
|
/** Hashes one canonical projection for authoritative content-head diffing. */
|
|
5
5
|
export const hashContentProjection = Effect.fn("AksaraContracts.hashContentProjection")((projection) => hashText(canonicalizeContentProjection(projection)));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { AppLocale } from "#contracts/locale";
|
|
3
3
|
/** Locale-owned root namespace for public material routes. */
|
|
4
4
|
export declare const MaterialPublicNamespaceSchema: Schema.Literals<readonly ["subjects", "materi", "faecher", "subjek"]>;
|
|
5
5
|
export type MaterialPublicNamespace = typeof MaterialPublicNamespaceSchema.Type;
|
|
@@ -3,7 +3,7 @@ import { ContentAuthorSchema } from "#contracts/content";
|
|
|
3
3
|
import { withPublicationDates } from "#contracts/date";
|
|
4
4
|
import { canonicalizeLearningGraphIdentity, LearningGraphIdentitySchema, } from "#contracts/graph/spec";
|
|
5
5
|
import { ContentKeySchema, PublicPathSchema } from "#contracts/ids";
|
|
6
|
-
import { AppLocaleSchema, ArtifactLocaleSchema
|
|
6
|
+
import { AppLocaleSchema, ArtifactLocaleSchema } from "#contracts/locale";
|
|
7
7
|
import { encodeJsonText } from "#contracts/text/json";
|
|
8
8
|
const MATERIAL_KEY_PATTERN = /^lesson\.[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$/u;
|
|
9
9
|
const SECTION_KEY_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;
|
|
@@ -2,7 +2,7 @@ import { Effect, MutableHashMap, Option, Schema, Stream } from "effect";
|
|
|
2
2
|
import { compareContentHeads, routeIdentity } from "#contracts/content";
|
|
3
3
|
import { PublicPathSchema } from "#contracts/ids";
|
|
4
4
|
import { digestProjections } from "#contracts/projection/digest";
|
|
5
|
-
import { ContentProjectionSchema
|
|
5
|
+
import { ContentProjectionSchema } from "#contracts/projection/spec";
|
|
6
6
|
import { ReleaseCountSchema } from "#contracts/release/count";
|
|
7
7
|
import { ReleaseCountMismatchFields, ReleaseDigestMismatchFields, } from "#contracts/release/mismatch";
|
|
8
8
|
/** One streamed projection failed strict schema decoding. */
|
package/dist/quran/identity.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { ActiveAppLocaleCode } from "#contracts/locale";
|
|
3
|
+
import { ENGLISH_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, MALAY_APP_LOCALE_CODE } from "#contracts/locale";
|
|
3
4
|
/** Official source identities whose bytes are pinned inside Aksara. */
|
|
4
5
|
export declare const QuranEmbeddedSourceIdSchema: Schema.Literals<readonly ["tanzil-text", "tanzil-metadata", "kemenag-names", "bubenheim-names", "nakafa-malay-names", "quranenc-english", "quranenc-indonesian", "quranenc-german", "quranenc-malay", "quranenc-tafsir"]>;
|
|
5
6
|
export type QuranEmbeddedSourceId = typeof QuranEmbeddedSourceIdSchema.Type;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { ActiveAppLocaleList } from "#contracts/locale";
|
|
3
|
+
import type { QuranSourceId } from "#contracts/quran/identity";
|
|
4
4
|
/** Complete source-field vocabulary supported by current Quran publication. */
|
|
5
5
|
export declare const QuranProvenanceScopeSchema: Schema.Union<readonly [Schema.Union<readonly [Schema.Literals<readonly ["arabic-text", "metadata"]>, Schema.Literals<readonly ["en-tafsir-access", "de-tafsir-access", "ms-tafsir-access"]>, Schema.Literal<"id-tafsir">]>, Schema.TemplateLiteral<readonly [Schema.Literals<readonly ["en", "id", "de", "ms"]>, "-surah-name"]>, Schema.TemplateLiteral<readonly [Schema.Literals<readonly ["en", "id", "de", "ms"]>, "-translation"]>]>;
|
|
6
6
|
export type QuranProvenanceScope = typeof QuranProvenanceScopeSchema.Type;
|
package/dist/quran/provenance.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Sha256HashSchema } from "#contracts/ids";
|
|
|
4
4
|
import { ActiveAppLocaleListSchema, activeAppLocaleCode, ENGLISH_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, MALAY_APP_LOCALE_CODE, } from "#contracts/locale";
|
|
5
5
|
import { canonicalizeQuranAttribution } from "#contracts/quran/attribution";
|
|
6
6
|
import { QuranNameProvenanceScopeSchema, QuranTranslationProvenanceScopeSchema, quranNameProvenanceScope, quranNameSourceForScope, quranTafsirSourceId, quranTranslationProvenanceScope, quranTranslationSourceForScope, } from "#contracts/quran/identity";
|
|
7
|
-
import { QuranProvenanceStatusSchema
|
|
7
|
+
import { QuranProvenanceStatusSchema } from "#contracts/quran/snapshot/spec";
|
|
8
8
|
import { hasCompleteQuranSourceCopy, QuranSourceAttributionSchema, } from "#contracts/quran/source";
|
|
9
9
|
import { encodeJsonText } from "#contracts/text/json";
|
|
10
10
|
/** Quran source fields that require independent provenance decisions. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { QuranSnapshot, QuranSnapshotFacts } from "#contracts/quran/snapshot/spec";
|
|
3
3
|
/** Serializes Quran snapshot facts in stable signed field order. */
|
|
4
4
|
export declare function canonicalizeQuranSnapshot(input: QuranSnapshotFacts): string;
|
|
5
5
|
/** Creates the content-addressed identity of one complete Quran snapshot. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { QuranRowPayload } from "#contracts/quran/snapshot/row";
|
|
3
3
|
/** Produces stable JSON for one exhaustive current Quran payload. */
|
|
4
4
|
export declare function canonicalizeQuranRow(payload: QuranRowPayload): string;
|
|
5
5
|
/** Computes one current row's domain-separated identity. */
|