@nakafa/aksara-contracts 6.5.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assessment/catalog.d.ts +18 -5
- package/dist/assessment/catalog.js +18 -8
- package/dist/assessment/choice.d.ts +10 -0
- package/dist/assessment/closure.d.ts +2 -1
- package/dist/assessment/closure.js +43 -62
- package/dist/assessment/document.d.ts +18 -0
- package/dist/assessment/document.js +10 -0
- package/dist/assessment/figure.d.ts +25 -2676
- package/dist/assessment/figure.js +17 -216
- package/dist/assessment/hash.d.ts +274 -4
- package/dist/assessment/inline.d.ts +25 -0
- package/dist/assessment/inline.js +22 -3
- package/dist/assessment/interaction.d.ts +10 -0
- package/dist/assessment/item.d.ts +864 -0
- package/dist/assessment/item.js +10 -2
- package/dist/assessment/locales.d.ts +10 -0
- package/dist/assessment/locales.js +58 -0
- package/dist/assessment/paper.d.ts +1349 -12
- package/dist/assessment/paper.js +93 -9
- package/dist/assessment/part.d.ts +5 -0
- package/dist/assessment/profile.d.ts +4 -4
- package/dist/assessment/rows.d.ts +1409 -0
- package/dist/assessment/rows.js +44 -0
- package/dist/assessment/scalar.d.ts +1 -1
- package/dist/assessment/scoring.d.ts +1 -1
- package/dist/assessment/snapshot.d.ts +372 -20
- package/dist/assessment/structure.d.ts +6 -0
- package/dist/assessment/structure.js +22 -2
- package/dist/locale.d.ts +9 -9
- package/dist/locale.js +4 -3
- package/dist/program/snapshot/hash.d.ts +2 -2
- package/dist/program/snapshot/spec.d.ts +2 -2
- package/dist/projection/material.d.ts +10 -0
- package/dist/projection/material.js +1 -1
- package/dist/quran/attribution.d.ts +2 -2
- package/dist/quran/identity.d.ts +31 -10
- package/dist/quran/identity.js +15 -3
- package/dist/quran/provenance.d.ts +16 -16
- package/dist/quran/provenance.js +4 -1
- package/dist/quran/snapshot/hash.d.ts +2 -2
- package/dist/quran/snapshot/row/hash.d.ts +48 -15
- package/dist/quran/snapshot/row.d.ts +18 -8
- package/dist/quran/snapshot/spec.d.ts +2 -2
- package/dist/quran/source.d.ts +17 -7
- package/dist/quran/source.js +13 -1
- package/dist/quran/spec.d.ts +4 -4
- package/dist/quran/spec.js +2 -1
- package/dist/release/current/evidence.d.ts +9 -9
- package/dist/release/current/state.d.ts +11 -11
- package/dist/release/hash.d.ts +2 -2
- package/dist/release/identity.d.ts +1 -1
- package/dist/release/lifecycle.d.ts +7 -7
- package/dist/release/policy.d.ts +1 -1
- package/dist/release/snapshot/data.d.ts +36 -11
- package/dist/release/snapshot/evidence/assessment.d.ts +1 -1
- package/dist/release/snapshot/evidence/program.d.ts +1 -1
- package/dist/release/snapshot/evidence/quran.d.ts +1 -1
- package/dist/release/snapshot/evidence.d.ts +3 -3
- package/dist/release/snapshot/verify.d.ts +179 -12
- package/dist/release/spec.d.ts +13 -13
- package/dist/release/verify.d.ts +2 -2
- package/dist/runtime/spec.d.ts +6 -6
- package/dist/runtime/verify.d.ts +4 -4
- package/dist/transport/group.d.ts +108 -33
- package/dist/transport/request.d.ts +1166 -114
- package/dist/transport/response.d.ts +64 -64
- package/dist/transport/snapshot.d.ts +72 -22
- package/dist/visual/base/layout.d.ts +27 -0
- package/dist/visual/base/layout.js +35 -0
- package/dist/visual/base/math.d.ts +523 -0
- package/dist/visual/base/math.js +72 -0
- package/dist/visual/base/media.d.ts +13 -0
- package/dist/visual/base/media.js +25 -0
- package/dist/visual/biology/bacteria.d.ts +55 -0
- package/dist/visual/biology/bacteria.js +79 -0
- package/dist/visual/biology/cell.d.ts +89 -0
- package/dist/visual/biology/cell.js +95 -0
- package/dist/visual/biology/climate.d.ts +75 -0
- package/dist/visual/biology/climate.js +94 -0
- package/dist/visual/biology/ecology.d.ts +75 -0
- package/dist/visual/biology/ecology.js +94 -0
- package/dist/visual/biology.d.ts +203 -0
- package/dist/visual/biology.js +108 -0
- package/dist/visual/card.d.ts +32 -0
- package/dist/visual/card.js +30 -0
- package/dist/visual/catalog.d.ts +3372 -0
- package/dist/visual/catalog.js +119 -0
- package/dist/visual/chemistry/atom.d.ts +79 -0
- package/dist/visual/chemistry/atom.js +109 -0
- package/dist/visual/chemistry/balance.d.ts +79 -0
- package/dist/visual/chemistry/balance.js +128 -0
- package/dist/visual/chemistry/bonding.d.ts +80 -0
- package/dist/visual/chemistry/bonding.js +147 -0
- package/dist/visual/chemistry/discovery.d.ts +96 -0
- package/dist/visual/chemistry/discovery.js +137 -0
- package/dist/visual/chemistry/electron.d.ts +41 -0
- package/dist/visual/chemistry/electron.js +69 -0
- package/dist/visual/chemistry/laws.d.ts +86 -0
- package/dist/visual/chemistry/laws.js +117 -0
- package/dist/visual/chemistry/particles.d.ts +114 -0
- package/dist/visual/chemistry/particles.js +149 -0
- package/dist/visual/chemistry/periodic.d.ts +52 -0
- package/dist/visual/chemistry/periodic.js +85 -0
- package/dist/visual/chemistry/reaction.d.ts +60 -0
- package/dist/visual/chemistry/reaction.js +76 -0
- package/dist/visual/entry.d.ts +42 -0
- package/dist/visual/entry.js +48 -0
- package/dist/visual/mathematics/chart.d.ts +30 -0
- package/dist/{assessment → visual/mathematics}/chart.js +26 -18
- package/dist/visual/mathematics/charts.d.ts +118 -0
- package/dist/visual/mathematics/charts.js +100 -0
- package/dist/visual/mathematics/function.d.ts +82 -0
- package/dist/visual/mathematics/function.js +102 -0
- package/dist/visual/mathematics/geometry.d.ts +222 -0
- package/dist/visual/mathematics/geometry.js +81 -0
- package/dist/visual/mathematics/line.d.ts +179 -0
- package/dist/visual/mathematics/line.js +156 -0
- package/dist/visual/mathematics/number.d.ts +21 -0
- package/dist/visual/mathematics/number.js +53 -0
- package/dist/visual/physics/braking.d.ts +62 -0
- package/dist/visual/physics/braking.js +83 -0
- package/dist/visual/physics/circular.d.ts +36 -0
- package/dist/visual/physics/circular.js +51 -0
- package/dist/visual/physics/efficiency.d.ts +93 -0
- package/dist/visual/physics/efficiency.js +129 -0
- package/dist/visual/physics/falling.d.ts +56 -0
- package/dist/visual/physics/falling.js +77 -0
- package/dist/visual/physics/force.d.ts +88 -0
- package/dist/visual/physics/force.js +115 -0
- package/dist/visual/physics/instrument.d.ts +93 -0
- package/dist/visual/physics/instrument.js +135 -0
- package/dist/visual/physics/measurement.d.ts +66 -0
- package/dist/visual/physics/measurement.js +85 -0
- package/dist/visual/physics/motion.d.ts +85 -0
- package/dist/visual/physics/motion.js +110 -0
- package/dist/visual/physics/parabolic.d.ts +42 -0
- package/dist/visual/physics/parabolic.js +56 -0
- package/dist/visual/physics/position.d.ts +87 -0
- package/dist/visual/physics/position.js +123 -0
- package/dist/visual/physics/power.d.ts +121 -0
- package/dist/visual/physics/power.js +162 -0
- package/dist/visual/physics/precision.d.ts +96 -0
- package/dist/visual/physics/precision.js +137 -0
- package/dist/visual/physics/product.d.ts +73 -0
- package/dist/visual/physics/product.js +96 -0
- package/dist/visual/physics/record.d.ts +34 -0
- package/dist/visual/physics/record.js +46 -0
- package/dist/visual/physics/relative.d.ts +55 -0
- package/dist/visual/physics/relative.js +76 -0
- package/dist/visual/physics/solar.d.ts +91 -0
- package/dist/visual/physics/solar.js +126 -0
- package/dist/visual/physics/vector.d.ts +103 -0
- package/dist/visual/physics/vector.js +123 -0
- package/dist/visual/physics/velocity.d.ts +112 -0
- package/dist/visual/physics/velocity.js +144 -0
- package/dist/visual/politics.d.ts +92 -0
- package/dist/visual/politics.js +76 -0
- package/package.json +13 -5
- package/dist/assessment/chart.d.ts +0 -62
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, DecimalSeparatorSchema, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** The rocket motions the acceleration visuals compare. */
|
|
5
|
+
const ACCELERATION_CASES = ["speed-up", "steady", "slow-down"];
|
|
6
|
+
/** The train motions of uniformly accelerated motion. */
|
|
7
|
+
const ACCELERATED_SCENARIOS = ["from-rest", "speed-up", "brake"];
|
|
8
|
+
/** Props of `AccelerationGraphCard`: the velocity-time graph of three rocket motions. */
|
|
9
|
+
function accelerationGraphCard(rich) {
|
|
10
|
+
return figure(Schema.Struct({
|
|
11
|
+
...cardFields(rich),
|
|
12
|
+
labels: Schema.Struct({
|
|
13
|
+
chooseCase: TextSchema,
|
|
14
|
+
contextLine: TextSchema,
|
|
15
|
+
scenarioNames: byIds(ACCELERATION_CASES, TextSchema),
|
|
16
|
+
timeAxis: TextSchema,
|
|
17
|
+
velocityAxis: TextSchema,
|
|
18
|
+
}),
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
/** Props of `AccelerationLab`: a rocket passing gates once every second. */
|
|
22
|
+
function accelerationLab(rich) {
|
|
23
|
+
return figure(Schema.Struct({
|
|
24
|
+
...cardFields(rich),
|
|
25
|
+
labels: Schema.Struct({
|
|
26
|
+
chooseCase: TextSchema,
|
|
27
|
+
factLabels: Schema.Struct({
|
|
28
|
+
acceleration: rich,
|
|
29
|
+
finalVelocity: rich,
|
|
30
|
+
initialVelocity: rich,
|
|
31
|
+
timeStep: rich,
|
|
32
|
+
}),
|
|
33
|
+
scenarioNames: byIds(ACCELERATION_CASES, rich),
|
|
34
|
+
viewLabel: TextSchema,
|
|
35
|
+
}),
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
/** Props of `NonUniformLinearMotionGraphCard`: the velocity-time graph of a train. */
|
|
39
|
+
function acceleratedGraphCard(rich) {
|
|
40
|
+
return figure(Schema.Struct({
|
|
41
|
+
...cardFields(rich),
|
|
42
|
+
labels: Schema.Struct({
|
|
43
|
+
chooseScenario: TextSchema,
|
|
44
|
+
scenarioNames: byIds(ACCELERATED_SCENARIOS, TextSchema),
|
|
45
|
+
timeAxis: TextSchema,
|
|
46
|
+
velocityAxis: TextSchema,
|
|
47
|
+
}),
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
/** Props of `NonUniformLinearMotionLab`: a train that speeds up or brakes evenly. */
|
|
51
|
+
function acceleratedLab(rich) {
|
|
52
|
+
return figure(Schema.Struct({
|
|
53
|
+
...cardFields(rich),
|
|
54
|
+
labels: Schema.Struct({
|
|
55
|
+
chooseScenario: TextSchema,
|
|
56
|
+
factLabels: Schema.Struct({
|
|
57
|
+
acceleration: rich,
|
|
58
|
+
displacement: rich,
|
|
59
|
+
finalVelocity: rich,
|
|
60
|
+
initialVelocity: rich,
|
|
61
|
+
}),
|
|
62
|
+
scenarioNames: byIds(ACCELERATED_SCENARIOS, rich),
|
|
63
|
+
viewLabel: TextSchema,
|
|
64
|
+
}),
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
/** Props of `UniformLinearMotionLab`: equal steps in equal times. */
|
|
68
|
+
function uniformLinearLab(rich) {
|
|
69
|
+
return figure(Schema.Struct({
|
|
70
|
+
...cardFields(rich),
|
|
71
|
+
labels: Schema.Struct({
|
|
72
|
+
chooseSpeed: TextSchema,
|
|
73
|
+
duration: rich,
|
|
74
|
+
positionStep: rich,
|
|
75
|
+
speed: rich,
|
|
76
|
+
stepDistance: rich,
|
|
77
|
+
viewLabel: TextSchema,
|
|
78
|
+
}),
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
/** Props of `UniformCircularMotionLab`: a body on a circle at a steady period. */
|
|
82
|
+
function uniformCircularLab(rich) {
|
|
83
|
+
return figure(Schema.Struct({
|
|
84
|
+
...cardFields(rich),
|
|
85
|
+
decimalSeparator: Schema.optionalKey(DecimalSeparatorSchema),
|
|
86
|
+
labels: Schema.Struct({
|
|
87
|
+
acceleration: rich,
|
|
88
|
+
choosePeriod: TextSchema,
|
|
89
|
+
period: rich,
|
|
90
|
+
radius: rich,
|
|
91
|
+
speed: rich,
|
|
92
|
+
viewLabel: TextSchema,
|
|
93
|
+
}),
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The labs and graphs of linear and circular motion. Their labels name the
|
|
98
|
+
* quantities a reader measures; the values come from the motion the reader
|
|
99
|
+
* picks, so no prop holds answer state.
|
|
100
|
+
*/
|
|
101
|
+
export function motionVisuals(rich) {
|
|
102
|
+
return {
|
|
103
|
+
AccelerationGraphCard: accelerationGraphCard(rich),
|
|
104
|
+
AccelerationLab: accelerationLab(rich),
|
|
105
|
+
NonUniformLinearMotionGraphCard: acceleratedGraphCard(rich),
|
|
106
|
+
NonUniformLinearMotionLab: acceleratedLab(rich),
|
|
107
|
+
UniformCircularMotionLab: uniformCircularLab(rich),
|
|
108
|
+
UniformLinearMotionLab: uniformLinearLab(rich),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The projectile labs. Their labels name the quantities the lab computes for
|
|
5
|
+
* the launch the reader picks, so no prop holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parabolicVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
ParabolicMovementAnalysisLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly decimalSeparator: Schema.optionalKey<Schema.Literals<readonly ["comma", "dot"]>>;
|
|
12
|
+
readonly labels: Schema.Struct<{
|
|
13
|
+
readonly chooseScenario: Schema.Trimmed;
|
|
14
|
+
readonly factLabels: Schema.Struct<{
|
|
15
|
+
readonly flightTime: RichSlot<E>;
|
|
16
|
+
readonly horizontalComponent: RichSlot<E>;
|
|
17
|
+
readonly instantaneousVelocity: RichSlot<E>;
|
|
18
|
+
readonly peakTime: RichSlot<E>;
|
|
19
|
+
readonly range: RichSlot<E>;
|
|
20
|
+
readonly verticalComponent: RichSlot<E>;
|
|
21
|
+
}>;
|
|
22
|
+
readonly scenarioNames: Schema.$Record<Schema.Literals<readonly ["sixty-degree", "long-drive", "high-arc"]>, RichSlot<E>>;
|
|
23
|
+
readonly viewLabel: Schema.Trimmed;
|
|
24
|
+
}>;
|
|
25
|
+
}>, "figure">;
|
|
26
|
+
ParabolicMovementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
27
|
+
readonly decimalSeparator: Schema.optionalKey<Schema.Literals<readonly ["comma", "dot"]>>;
|
|
28
|
+
readonly defaultLaunchId: Schema.optionalKey<Schema.Literals<readonly ["low-angle", "balanced-angle", "high-angle"]>>;
|
|
29
|
+
readonly description: Schema.optionalKey<RichSlot<E>>;
|
|
30
|
+
readonly labels: Schema.Struct<{
|
|
31
|
+
readonly chooseLaunch: Schema.Trimmed;
|
|
32
|
+
readonly factLabels: Schema.Struct<{
|
|
33
|
+
readonly flightTime: RichSlot<E>;
|
|
34
|
+
readonly initialSpeed: RichSlot<E>;
|
|
35
|
+
readonly peakHeight: RichSlot<E>;
|
|
36
|
+
readonly range: RichSlot<E>;
|
|
37
|
+
}>;
|
|
38
|
+
readonly viewLabel: Schema.Trimmed;
|
|
39
|
+
}>;
|
|
40
|
+
readonly title: Schema.optionalKey<RichSlot<E>>;
|
|
41
|
+
}>, "figure">;
|
|
42
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, DecimalSeparatorSchema, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** The launches the parabolic movement lab compares. */
|
|
5
|
+
const LAUNCHES = ["low-angle", "balanced-angle", "high-angle"];
|
|
6
|
+
/** The projectiles the analysis lab follows. */
|
|
7
|
+
const PROJECTILES = ["sixty-degree", "long-drive", "high-arc"];
|
|
8
|
+
/** Props of `ParabolicMovementLab`: one launch speed at three angles. */
|
|
9
|
+
function parabolicLab(rich) {
|
|
10
|
+
return figure(Schema.Struct({
|
|
11
|
+
decimalSeparator: Schema.optionalKey(DecimalSeparatorSchema),
|
|
12
|
+
defaultLaunchId: Schema.optionalKey(Schema.Literals(LAUNCHES)),
|
|
13
|
+
description: Schema.optionalKey(rich),
|
|
14
|
+
labels: Schema.Struct({
|
|
15
|
+
chooseLaunch: TextSchema,
|
|
16
|
+
factLabels: Schema.Struct({
|
|
17
|
+
flightTime: rich,
|
|
18
|
+
initialSpeed: rich,
|
|
19
|
+
peakHeight: rich,
|
|
20
|
+
range: rich,
|
|
21
|
+
}),
|
|
22
|
+
viewLabel: TextSchema,
|
|
23
|
+
}),
|
|
24
|
+
title: Schema.optionalKey(rich),
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
/** Props of `ParabolicMovementAnalysisLab`: the components of a projectile's velocity. */
|
|
28
|
+
function analysisLab(rich) {
|
|
29
|
+
return figure(Schema.Struct({
|
|
30
|
+
...cardFields(rich),
|
|
31
|
+
decimalSeparator: Schema.optionalKey(DecimalSeparatorSchema),
|
|
32
|
+
labels: Schema.Struct({
|
|
33
|
+
chooseScenario: TextSchema,
|
|
34
|
+
factLabels: Schema.Struct({
|
|
35
|
+
flightTime: rich,
|
|
36
|
+
horizontalComponent: rich,
|
|
37
|
+
instantaneousVelocity: rich,
|
|
38
|
+
peakTime: rich,
|
|
39
|
+
range: rich,
|
|
40
|
+
verticalComponent: rich,
|
|
41
|
+
}),
|
|
42
|
+
scenarioNames: byIds(PROJECTILES, rich),
|
|
43
|
+
viewLabel: TextSchema,
|
|
44
|
+
}),
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The projectile labs. Their labels name the quantities the lab computes for
|
|
49
|
+
* the launch the reader picks, so no prop holds answer state.
|
|
50
|
+
*/
|
|
51
|
+
export function parabolicVisuals(rich) {
|
|
52
|
+
return {
|
|
53
|
+
ParabolicMovementAnalysisLab: analysisLab(rich),
|
|
54
|
+
ParabolicMovementLab: parabolicLab(rich),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the position and speed labs. No prop states the conclusion a lab
|
|
5
|
+
* leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function positionVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
StreetOriginPositionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly change: RichSlot<E>;
|
|
13
|
+
readonly chooseOrigin: Schema.Trimmed;
|
|
14
|
+
readonly end: RichSlot<E>;
|
|
15
|
+
readonly origins: Schema.$Record<Schema.Literals<readonly ["store", "house", "pole"]>, RichSlot<E>>;
|
|
16
|
+
readonly start: RichSlot<E>;
|
|
17
|
+
readonly viewLabel: Schema.Trimmed;
|
|
18
|
+
}>;
|
|
19
|
+
}>, "figure">;
|
|
20
|
+
CityWalkDisplacementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
21
|
+
readonly description: RichSlot<E>;
|
|
22
|
+
readonly title: RichSlot<E>;
|
|
23
|
+
readonly labels: Schema.Struct<{
|
|
24
|
+
readonly averageSpeed: RichSlot<E>;
|
|
25
|
+
readonly averageVelocity: RichSlot<E>;
|
|
26
|
+
readonly displacement: RichSlot<E>;
|
|
27
|
+
readonly distance: RichSlot<E>;
|
|
28
|
+
readonly time: RichSlot<E>;
|
|
29
|
+
readonly viewLabel: Schema.Trimmed;
|
|
30
|
+
}>;
|
|
31
|
+
readonly legs: Schema.NonEmptyArray<Schema.Struct<{
|
|
32
|
+
readonly east: Schema.Finite;
|
|
33
|
+
readonly north: Schema.Finite;
|
|
34
|
+
}>>;
|
|
35
|
+
readonly pace: Schema.Finite;
|
|
36
|
+
}>, "figure">;
|
|
37
|
+
RunningTrackDisplacementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
38
|
+
readonly description: RichSlot<E>;
|
|
39
|
+
readonly title: RichSlot<E>;
|
|
40
|
+
readonly labels: Schema.Struct<{
|
|
41
|
+
readonly averageVelocity: RichSlot<E>;
|
|
42
|
+
readonly chooseDistance: Schema.Trimmed;
|
|
43
|
+
readonly displacement: RichSlot<E>;
|
|
44
|
+
readonly distance: RichSlot<E>;
|
|
45
|
+
readonly time: RichSlot<E>;
|
|
46
|
+
readonly viewLabel: Schema.Trimmed;
|
|
47
|
+
}>;
|
|
48
|
+
readonly speed: Schema.Finite;
|
|
49
|
+
}>, "figure">;
|
|
50
|
+
CarTripSecantSlopeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
51
|
+
readonly description: RichSlot<E>;
|
|
52
|
+
readonly title: RichSlot<E>;
|
|
53
|
+
readonly graph: Schema.optionalKey<Schema.Literals<readonly ["position", "velocity"]>>;
|
|
54
|
+
readonly labels: Schema.Struct<{
|
|
55
|
+
readonly change: RichSlot<E>;
|
|
56
|
+
readonly chooseInterval: Schema.Trimmed;
|
|
57
|
+
readonly elapsed: RichSlot<E>;
|
|
58
|
+
readonly rate: RichSlot<E>;
|
|
59
|
+
readonly viewLabel: Schema.Trimmed;
|
|
60
|
+
}>;
|
|
61
|
+
readonly trip: Schema.optionalKey<Schema.Literals<readonly ["commute", "cruise", "return"]>>;
|
|
62
|
+
}>, "figure">;
|
|
63
|
+
SpeedTrapInstantSpeedLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
64
|
+
readonly description: RichSlot<E>;
|
|
65
|
+
readonly title: RichSlot<E>;
|
|
66
|
+
readonly labels: Schema.Struct<{
|
|
67
|
+
readonly averageSpeed: RichSlot<E>;
|
|
68
|
+
readonly chooseGap: Schema.Trimmed;
|
|
69
|
+
readonly elapsed: RichSlot<E>;
|
|
70
|
+
readonly gap: RichSlot<E>;
|
|
71
|
+
readonly instantSpeed: RichSlot<E>;
|
|
72
|
+
readonly viewLabel: Schema.Trimmed;
|
|
73
|
+
}>;
|
|
74
|
+
}>, "figure">;
|
|
75
|
+
BicycleWheelSpeedLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
76
|
+
readonly description: RichSlot<E>;
|
|
77
|
+
readonly title: RichSlot<E>;
|
|
78
|
+
readonly labels: Schema.Struct<{
|
|
79
|
+
readonly angularSpeed: RichSlot<E>;
|
|
80
|
+
readonly choosePeriod: Schema.Trimmed;
|
|
81
|
+
readonly reflectorSpeed: RichSlot<E>;
|
|
82
|
+
readonly valveAcceleration: RichSlot<E>;
|
|
83
|
+
readonly valveSpeed: RichSlot<E>;
|
|
84
|
+
readonly viewLabel: Schema.Trimmed;
|
|
85
|
+
}>;
|
|
86
|
+
}>, "figure">;
|
|
87
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/**
|
|
5
|
+
* Props of `StreetOriginPositionLab`: a cyclist rides along a street with a
|
|
6
|
+
* store at zero, Rani's house at 20 m, and a flagpole at 50 m, east positive.
|
|
7
|
+
*/
|
|
8
|
+
function streetOriginPositionLab(rich) {
|
|
9
|
+
return figure(Schema.Struct({
|
|
10
|
+
...cardFields(rich),
|
|
11
|
+
labels: Schema.Struct({
|
|
12
|
+
change: rich,
|
|
13
|
+
chooseOrigin: TextSchema,
|
|
14
|
+
end: rich,
|
|
15
|
+
origins: byIds(["store", "house", "pole"], rich),
|
|
16
|
+
start: rich,
|
|
17
|
+
viewLabel: TextSchema,
|
|
18
|
+
}),
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props of `CityWalkDisplacementLab`: a walk through a town seen from a drone.
|
|
23
|
+
*/
|
|
24
|
+
function cityWalkDisplacementLab(rich) {
|
|
25
|
+
return figure(Schema.Struct({
|
|
26
|
+
...cardFields(rich),
|
|
27
|
+
labels: Schema.Struct({
|
|
28
|
+
averageSpeed: rich,
|
|
29
|
+
averageVelocity: rich,
|
|
30
|
+
displacement: rich,
|
|
31
|
+
distance: rich,
|
|
32
|
+
time: rich,
|
|
33
|
+
viewLabel: TextSchema,
|
|
34
|
+
}),
|
|
35
|
+
legs: Schema.NonEmptyArray(Schema.Struct({ east: Schema.Finite, north: Schema.Finite })),
|
|
36
|
+
pace: Schema.Finite,
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Props of `RunningTrackDisplacementLab`: a runner on lane 1 of a 400 m
|
|
41
|
+
* athletics track, seen from above.
|
|
42
|
+
*/
|
|
43
|
+
function runningTrackDisplacementLab(rich) {
|
|
44
|
+
return figure(Schema.Struct({
|
|
45
|
+
...cardFields(rich),
|
|
46
|
+
labels: Schema.Struct({
|
|
47
|
+
averageVelocity: rich,
|
|
48
|
+
chooseDistance: TextSchema,
|
|
49
|
+
displacement: rich,
|
|
50
|
+
distance: rich,
|
|
51
|
+
time: rich,
|
|
52
|
+
viewLabel: TextSchema,
|
|
53
|
+
}),
|
|
54
|
+
speed: Schema.Finite,
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Props of `CarTripSecantSlopeLab`: a car drives a trip along a straight road
|
|
59
|
+
* while its position-time or velocity-time graph draws below.
|
|
60
|
+
*/
|
|
61
|
+
function carTripSecantSlopeLab(rich) {
|
|
62
|
+
return figure(Schema.Struct({
|
|
63
|
+
...cardFields(rich),
|
|
64
|
+
graph: Schema.optionalKey(Schema.Literals(["position", "velocity"])),
|
|
65
|
+
labels: Schema.Struct({
|
|
66
|
+
change: rich,
|
|
67
|
+
chooseInterval: TextSchema,
|
|
68
|
+
elapsed: rich,
|
|
69
|
+
rate: rich,
|
|
70
|
+
viewLabel: TextSchema,
|
|
71
|
+
}),
|
|
72
|
+
trip: Schema.optionalKey(Schema.Literals(["commute", "cruise", "return"])),
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Props of `SpeedTrapInstantSpeedLab`: a speed trap of two light gates around
|
|
77
|
+
* one spot of a test track, which a car crosses while speeding up from rest at
|
|
78
|
+
* 4 m/s².
|
|
79
|
+
*/
|
|
80
|
+
function speedTrapInstantSpeedLab(rich) {
|
|
81
|
+
return figure(Schema.Struct({
|
|
82
|
+
...cardFields(rich),
|
|
83
|
+
labels: Schema.Struct({
|
|
84
|
+
averageSpeed: rich,
|
|
85
|
+
chooseGap: TextSchema,
|
|
86
|
+
elapsed: rich,
|
|
87
|
+
gap: rich,
|
|
88
|
+
instantSpeed: rich,
|
|
89
|
+
viewLabel: TextSchema,
|
|
90
|
+
}),
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Props of `BicycleWheelSpeedLab`: a bicycle wheel spinning on a stand, with
|
|
95
|
+
* its valve on the rim and a reflector halfway out.
|
|
96
|
+
*/
|
|
97
|
+
function bicycleWheelSpeedLab(rich) {
|
|
98
|
+
return figure(Schema.Struct({
|
|
99
|
+
...cardFields(rich),
|
|
100
|
+
labels: Schema.Struct({
|
|
101
|
+
angularSpeed: rich,
|
|
102
|
+
choosePeriod: TextSchema,
|
|
103
|
+
reflectorSpeed: rich,
|
|
104
|
+
valveAcceleration: rich,
|
|
105
|
+
valveSpeed: rich,
|
|
106
|
+
viewLabel: TextSchema,
|
|
107
|
+
}),
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The props of the position and speed labs. No prop states the conclusion a lab
|
|
112
|
+
* leads to, so none holds answer state.
|
|
113
|
+
*/
|
|
114
|
+
export function positionVisuals(rich) {
|
|
115
|
+
return {
|
|
116
|
+
StreetOriginPositionLab: streetOriginPositionLab(rich),
|
|
117
|
+
CityWalkDisplacementLab: cityWalkDisplacementLab(rich),
|
|
118
|
+
RunningTrackDisplacementLab: runningTrackDisplacementLab(rich),
|
|
119
|
+
CarTripSecantSlopeLab: carTripSecantSlopeLab(rich),
|
|
120
|
+
SpeedTrapInstantSpeedLab: speedTrapInstantSpeedLab(rich),
|
|
121
|
+
BicycleWheelSpeedLab: bicycleWheelSpeedLab(rich),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the power plant labs. No prop states the conclusion a lab leads
|
|
5
|
+
* to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function powerVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
HydroDamLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly head: Schema.optionalKey<Schema.Finite>;
|
|
12
|
+
readonly labels: Schema.Struct<{
|
|
13
|
+
readonly electric: RichSlot<E>;
|
|
14
|
+
readonly head: RichSlot<E>;
|
|
15
|
+
readonly headControl: Schema.Trimmed;
|
|
16
|
+
readonly kinetic: RichSlot<E>;
|
|
17
|
+
readonly potential: RichSlot<E>;
|
|
18
|
+
readonly shaft: RichSlot<E>;
|
|
19
|
+
readonly speed: RichSlot<E>;
|
|
20
|
+
readonly viewLabel: Schema.Trimmed;
|
|
21
|
+
}>;
|
|
22
|
+
}>, "figure">;
|
|
23
|
+
MicrohydroLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
24
|
+
readonly description: RichSlot<E>;
|
|
25
|
+
readonly title: RichSlot<E>;
|
|
26
|
+
readonly flow: Schema.optionalKey<Schema.Finite>;
|
|
27
|
+
readonly head: Schema.optionalKey<Schema.Finite>;
|
|
28
|
+
readonly labels: Schema.Struct<{
|
|
29
|
+
readonly flowControl: Schema.Trimmed;
|
|
30
|
+
readonly headControl: Schema.Trimmed;
|
|
31
|
+
readonly homes: RichSlot<E>;
|
|
32
|
+
readonly power: RichSlot<E>;
|
|
33
|
+
readonly viewLabel: Schema.Trimmed;
|
|
34
|
+
}>;
|
|
35
|
+
}>, "figure">;
|
|
36
|
+
WaveBuoyPowerLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
37
|
+
readonly description: RichSlot<E>;
|
|
38
|
+
readonly title: RichSlot<E>;
|
|
39
|
+
readonly labels: Schema.Struct<{
|
|
40
|
+
readonly chooseSea: Schema.Trimmed;
|
|
41
|
+
readonly height: RichSlot<E>;
|
|
42
|
+
readonly length: RichSlot<E>;
|
|
43
|
+
readonly period: RichSlot<E>;
|
|
44
|
+
readonly power: RichSlot<E>;
|
|
45
|
+
readonly seas: Schema.$Record<Schema.Literals<readonly ["calm", "moderate", "rough"]>, RichSlot<E>>;
|
|
46
|
+
readonly viewLabel: Schema.Trimmed;
|
|
47
|
+
}>;
|
|
48
|
+
readonly sea: Schema.optionalKey<Schema.Literals<readonly ["calm", "moderate", "rough"]>>;
|
|
49
|
+
}>, "figure">;
|
|
50
|
+
WindRotorLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
51
|
+
readonly description: RichSlot<E>;
|
|
52
|
+
readonly title: RichSlot<E>;
|
|
53
|
+
readonly labels: Schema.Struct<{
|
|
54
|
+
readonly chooseSite: Schema.Trimmed;
|
|
55
|
+
readonly daily: RichSlot<E>;
|
|
56
|
+
readonly electric: RichSlot<E>;
|
|
57
|
+
readonly sites: Schema.$Record<Schema.Literals<readonly ["valley", "hill", "coast"]>, RichSlot<E>>;
|
|
58
|
+
readonly speed: RichSlot<E>;
|
|
59
|
+
readonly viewLabel: Schema.Trimmed;
|
|
60
|
+
readonly wind: RichSlot<E>;
|
|
61
|
+
}>;
|
|
62
|
+
readonly site: Schema.optionalKey<Schema.Literals<readonly ["valley", "hill", "coast"]>>;
|
|
63
|
+
}>, "figure">;
|
|
64
|
+
GeothermalLoopLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
65
|
+
readonly description: RichSlot<E>;
|
|
66
|
+
readonly title: RichSlot<E>;
|
|
67
|
+
readonly labels: Schema.Struct<{
|
|
68
|
+
readonly electric: RichSlot<E>;
|
|
69
|
+
readonly heat: RichSlot<E>;
|
|
70
|
+
readonly ideal: RichSlot<E>;
|
|
71
|
+
readonly real: RichSlot<E>;
|
|
72
|
+
readonly reservoirControl: Schema.Trimmed;
|
|
73
|
+
readonly viewLabel: Schema.Trimmed;
|
|
74
|
+
}>;
|
|
75
|
+
readonly reservoir: Schema.optionalKey<Schema.Finite>;
|
|
76
|
+
}>, "figure">;
|
|
77
|
+
BiogasDigesterLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
78
|
+
readonly description: RichSlot<E>;
|
|
79
|
+
readonly title: RichSlot<E>;
|
|
80
|
+
readonly dung: Schema.optionalKey<Schema.Finite>;
|
|
81
|
+
readonly labels: Schema.Struct<{
|
|
82
|
+
readonly cooking: RichSlot<E>;
|
|
83
|
+
readonly dungControl: Schema.Trimmed;
|
|
84
|
+
readonly energy: RichSlot<E>;
|
|
85
|
+
readonly gas: RichSlot<E>;
|
|
86
|
+
readonly methane: RichSlot<E>;
|
|
87
|
+
readonly viewLabel: Schema.Trimmed;
|
|
88
|
+
}>;
|
|
89
|
+
}>, "figure">;
|
|
90
|
+
SteamPlantCycleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
91
|
+
readonly description: RichSlot<E>;
|
|
92
|
+
readonly title: RichSlot<E>;
|
|
93
|
+
readonly fuel: Schema.optionalKey<Schema.Literals<readonly ["coal", "gas", "uranium"]>>;
|
|
94
|
+
readonly labels: Schema.Struct<{
|
|
95
|
+
readonly chooseFuel: Schema.Trimmed;
|
|
96
|
+
readonly electric: RichSlot<E>;
|
|
97
|
+
readonly fuelUse: RichSlot<E>;
|
|
98
|
+
readonly fuels: Schema.$Record<Schema.Literals<readonly ["coal", "gas", "uranium"]>, RichSlot<E>>;
|
|
99
|
+
readonly heat: RichSlot<E>;
|
|
100
|
+
readonly ideal: RichSlot<E>;
|
|
101
|
+
readonly steam: RichSlot<E>;
|
|
102
|
+
readonly viewLabel: Schema.Trimmed;
|
|
103
|
+
readonly waste: RichSlot<E>;
|
|
104
|
+
}>;
|
|
105
|
+
}>, "figure">;
|
|
106
|
+
FuelCombustionCarbonLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
107
|
+
readonly description: RichSlot<E>;
|
|
108
|
+
readonly title: RichSlot<E>;
|
|
109
|
+
readonly fuel: Schema.optionalKey<Schema.Literals<readonly ["coal", "diesel", "methane"]>>;
|
|
110
|
+
readonly labels: Schema.Struct<{
|
|
111
|
+
readonly carbon: RichSlot<E>;
|
|
112
|
+
readonly chooseFuel: Schema.Trimmed;
|
|
113
|
+
readonly dioxide: RichSlot<E>;
|
|
114
|
+
readonly fuels: Schema.$Record<Schema.Literals<readonly ["coal", "diesel", "methane"]>, RichSlot<E>>;
|
|
115
|
+
readonly oxygen: RichSlot<E>;
|
|
116
|
+
readonly perEnergy: RichSlot<E>;
|
|
117
|
+
readonly viewLabel: Schema.Trimmed;
|
|
118
|
+
readonly volume: RichSlot<E>;
|
|
119
|
+
}>;
|
|
120
|
+
}>, "figure">;
|
|
121
|
+
};
|