@nakafa/aksara-contracts 7.0.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/figure.d.ts +24 -48725
- package/dist/assessment/figure.js +10 -6
- package/dist/visual/base/layout.d.ts +6 -6
- package/dist/visual/base/math.d.ts +4 -4
- package/dist/visual/base/media.d.ts +2 -2
- 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 +9 -9
- package/dist/visual/catalog.d.ts +1645 -26906
- package/dist/visual/catalog.js +47 -1
- package/dist/visual/chemistry/atom.d.ts +4 -4
- 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 +2 -2
- package/dist/visual/chemistry/laws.d.ts +4 -4
- package/dist/visual/chemistry/particles.d.ts +5 -5
- package/dist/visual/chemistry/periodic.d.ts +2 -2
- package/dist/visual/chemistry/reaction.d.ts +3 -3
- package/dist/visual/entry.d.ts +4 -4
- package/dist/visual/mathematics/chart.d.ts +1 -1
- package/dist/visual/mathematics/charts.d.ts +5 -5
- package/dist/visual/mathematics/function.d.ts +7 -7
- package/dist/visual/mathematics/geometry.d.ts +4 -4
- package/dist/visual/mathematics/number.d.ts +1 -1
- 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 +4 -4
- package/dist/visual/physics/motion.d.ts +6 -6
- package/dist/visual/physics/parabolic.d.ts +2 -2
- 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 +7 -7
- package/dist/visual/politics.d.ts +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/**
|
|
5
|
+
* Props of `MicrometerScrewLab`: a micrometer screw gauge closed on a steel
|
|
6
|
+
* ball, with a magnifier on its sleeve and thimble.
|
|
7
|
+
*/
|
|
8
|
+
function micrometerScrewLab(rich) {
|
|
9
|
+
return figure(Schema.Struct({
|
|
10
|
+
...cardFields(rich),
|
|
11
|
+
labels: Schema.Struct({
|
|
12
|
+
division: rich,
|
|
13
|
+
reading: rich,
|
|
14
|
+
size: TextSchema,
|
|
15
|
+
sleeve: rich,
|
|
16
|
+
viewLabel: TextSchema,
|
|
17
|
+
}),
|
|
18
|
+
thickness: Schema.optionalKey(Schema.Finite),
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props of `VernierCaliperLab`: a vernier caliper closed on a brass cylinder,
|
|
23
|
+
* with a magnifier on its scales.
|
|
24
|
+
*/
|
|
25
|
+
function vernierCaliperLab(rich) {
|
|
26
|
+
return figure(Schema.Struct({
|
|
27
|
+
...cardFields(rich),
|
|
28
|
+
labels: Schema.Struct({
|
|
29
|
+
centimetres: rich,
|
|
30
|
+
line: rich,
|
|
31
|
+
main: rich,
|
|
32
|
+
reading: rich,
|
|
33
|
+
viewLabel: TextSchema,
|
|
34
|
+
width: TextSchema,
|
|
35
|
+
}),
|
|
36
|
+
width: Schema.optionalKey(Schema.Finite),
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Props of `MicroscopeScaleLab`: a hair seen through a microscope with a scale
|
|
41
|
+
* in its eyepiece.
|
|
42
|
+
*/
|
|
43
|
+
function microscopeScaleLab(rich) {
|
|
44
|
+
return figure(Schema.Struct({
|
|
45
|
+
...cardFields(rich),
|
|
46
|
+
labels: Schema.Struct({
|
|
47
|
+
chooseObjective: TextSchema,
|
|
48
|
+
diameter: rich,
|
|
49
|
+
divisions: rich,
|
|
50
|
+
metres: rich,
|
|
51
|
+
oneDivision: rich,
|
|
52
|
+
viewLabel: TextSchema,
|
|
53
|
+
}),
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Props of `ParallaxReadingLab`: an eye reading the water in a measuring
|
|
58
|
+
* cylinder.
|
|
59
|
+
*/
|
|
60
|
+
function parallaxReadingLab(rich) {
|
|
61
|
+
return figure(Schema.Struct({
|
|
62
|
+
...cardFields(rich),
|
|
63
|
+
labels: Schema.Struct({
|
|
64
|
+
error: rich,
|
|
65
|
+
eye: TextSchema,
|
|
66
|
+
reading: rich,
|
|
67
|
+
trueVolume: rich,
|
|
68
|
+
viewLabel: TextSchema,
|
|
69
|
+
}),
|
|
70
|
+
offset: Schema.optionalKey(Schema.Finite),
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
/** Props of `LightGateSpeedLab`: a trolley rolling through two light gates. */
|
|
74
|
+
function lightGateSpeedLab(rich) {
|
|
75
|
+
return figure(Schema.Struct({
|
|
76
|
+
...cardFields(rich),
|
|
77
|
+
distance: Schema.optionalKey(Schema.Finite),
|
|
78
|
+
labels: Schema.Struct({
|
|
79
|
+
distance: TextSchema,
|
|
80
|
+
speed: rich,
|
|
81
|
+
time: rich,
|
|
82
|
+
viewLabel: TextSchema,
|
|
83
|
+
}),
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Props of `StopwatchSpreadLab`: ten swings of a pendulum timed by hand, trial
|
|
88
|
+
* after trial.
|
|
89
|
+
*/
|
|
90
|
+
function stopwatchSpreadLab(rich) {
|
|
91
|
+
return figure(Schema.Struct({
|
|
92
|
+
...cardFields(rich),
|
|
93
|
+
count: Schema.optionalKey(Schema.Finite),
|
|
94
|
+
labels: Schema.Struct({
|
|
95
|
+
mean: rich,
|
|
96
|
+
spread: rich,
|
|
97
|
+
trials: TextSchema,
|
|
98
|
+
uncertainty: rich,
|
|
99
|
+
viewLabel: TextSchema,
|
|
100
|
+
}),
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Props of `PendulumPeriodLab`: three pendulums of one length with a 50 g
|
|
105
|
+
* wooden bob, a 200 g brass bob and a 500 g lead bob.
|
|
106
|
+
*/
|
|
107
|
+
function pendulumPeriodLab(rich) {
|
|
108
|
+
return figure(Schema.Struct({
|
|
109
|
+
...cardFields(rich),
|
|
110
|
+
labels: Schema.Struct({
|
|
111
|
+
check: rich,
|
|
112
|
+
gravity: rich,
|
|
113
|
+
length: TextSchema,
|
|
114
|
+
masses: rich,
|
|
115
|
+
period: rich,
|
|
116
|
+
viewLabel: TextSchema,
|
|
117
|
+
}),
|
|
118
|
+
length: Schema.optionalKey(Schema.Finite),
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The props of the labs that read a measuring instrument. No prop states the
|
|
123
|
+
* conclusion a lab leads to, so none holds answer state.
|
|
124
|
+
*/
|
|
125
|
+
export function instrumentVisuals(rich) {
|
|
126
|
+
return {
|
|
127
|
+
MicrometerScrewLab: micrometerScrewLab(rich),
|
|
128
|
+
VernierCaliperLab: vernierCaliperLab(rich),
|
|
129
|
+
MicroscopeScaleLab: microscopeScaleLab(rich),
|
|
130
|
+
ParallaxReadingLab: parallaxReadingLab(rich),
|
|
131
|
+
LightGateSpeedLab: lightGateSpeedLab(rich),
|
|
132
|
+
StopwatchSpreadLab: stopwatchSpreadLab(rich),
|
|
133
|
+
PendulumPeriodLab: pendulumPeriodLab(rich),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
@@ -16,7 +16,7 @@ export declare function measurementVisuals<E>(rich: RichSlot<E>): {
|
|
|
16
16
|
readonly modes: Schema.$Record<Schema.Literals<readonly ["length", "area", "volume"]>, Schema.Trimmed>;
|
|
17
17
|
readonly unit: Schema.Trimmed;
|
|
18
18
|
}>;
|
|
19
|
-
}
|
|
19
|
+
}>, "figure">;
|
|
20
20
|
MeasurementToolsLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
21
21
|
readonly description: RichSlot<E>;
|
|
22
22
|
readonly title: RichSlot<E>;
|
|
@@ -33,7 +33,7 @@ export declare function measurementVisuals<E>(rich: RichSlot<E>): {
|
|
|
33
33
|
readonly tab: Schema.Trimmed;
|
|
34
34
|
}>>;
|
|
35
35
|
}>;
|
|
36
|
-
}
|
|
36
|
+
}>, "figure">;
|
|
37
37
|
VectorConceptLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
38
38
|
readonly description: RichSlot<E>;
|
|
39
39
|
readonly title: RichSlot<E>;
|
|
@@ -49,7 +49,7 @@ export declare function measurementVisuals<E>(rich: RichSlot<E>): {
|
|
|
49
49
|
readonly netIdeaValue: Schema.Trimmed;
|
|
50
50
|
readonly rightCable: RichSlot<E>;
|
|
51
51
|
}>;
|
|
52
|
-
}
|
|
52
|
+
}>, "figure">;
|
|
53
53
|
WindEnergyConversionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
54
54
|
readonly description: RichSlot<E>;
|
|
55
55
|
readonly title: RichSlot<E>;
|
|
@@ -62,5 +62,5 @@ export declare function measurementVisuals<E>(rich: RichSlot<E>): {
|
|
|
62
62
|
readonly speedUnit: Schema.Trimmed;
|
|
63
63
|
readonly viewLabel: Schema.Trimmed;
|
|
64
64
|
}>;
|
|
65
|
-
}
|
|
65
|
+
}>, "figure">;
|
|
66
66
|
};
|
|
@@ -16,7 +16,7 @@ export declare function motionVisuals<E>(rich: RichSlot<E>): {
|
|
|
16
16
|
readonly timeAxis: Schema.Trimmed;
|
|
17
17
|
readonly velocityAxis: Schema.Trimmed;
|
|
18
18
|
}>;
|
|
19
|
-
}
|
|
19
|
+
}>, "figure">;
|
|
20
20
|
AccelerationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
21
21
|
readonly description: RichSlot<E>;
|
|
22
22
|
readonly title: RichSlot<E>;
|
|
@@ -31,7 +31,7 @@ export declare function motionVisuals<E>(rich: RichSlot<E>): {
|
|
|
31
31
|
readonly scenarioNames: Schema.$Record<Schema.Literals<readonly ["speed-up", "steady", "slow-down"]>, RichSlot<E>>;
|
|
32
32
|
readonly viewLabel: Schema.Trimmed;
|
|
33
33
|
}>;
|
|
34
|
-
}
|
|
34
|
+
}>, "figure">;
|
|
35
35
|
NonUniformLinearMotionGraphCard: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
36
36
|
readonly description: RichSlot<E>;
|
|
37
37
|
readonly title: RichSlot<E>;
|
|
@@ -41,7 +41,7 @@ export declare function motionVisuals<E>(rich: RichSlot<E>): {
|
|
|
41
41
|
readonly timeAxis: Schema.Trimmed;
|
|
42
42
|
readonly velocityAxis: Schema.Trimmed;
|
|
43
43
|
}>;
|
|
44
|
-
}
|
|
44
|
+
}>, "figure">;
|
|
45
45
|
NonUniformLinearMotionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
46
46
|
readonly description: RichSlot<E>;
|
|
47
47
|
readonly title: RichSlot<E>;
|
|
@@ -56,7 +56,7 @@ export declare function motionVisuals<E>(rich: RichSlot<E>): {
|
|
|
56
56
|
readonly scenarioNames: Schema.$Record<Schema.Literals<readonly ["from-rest", "speed-up", "brake"]>, RichSlot<E>>;
|
|
57
57
|
readonly viewLabel: Schema.Trimmed;
|
|
58
58
|
}>;
|
|
59
|
-
}
|
|
59
|
+
}>, "figure">;
|
|
60
60
|
UniformCircularMotionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
61
61
|
readonly description: RichSlot<E>;
|
|
62
62
|
readonly title: RichSlot<E>;
|
|
@@ -69,7 +69,7 @@ export declare function motionVisuals<E>(rich: RichSlot<E>): {
|
|
|
69
69
|
readonly speed: RichSlot<E>;
|
|
70
70
|
readonly viewLabel: Schema.Trimmed;
|
|
71
71
|
}>;
|
|
72
|
-
}
|
|
72
|
+
}>, "figure">;
|
|
73
73
|
UniformLinearMotionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
74
74
|
readonly description: RichSlot<E>;
|
|
75
75
|
readonly title: RichSlot<E>;
|
|
@@ -81,5 +81,5 @@ export declare function motionVisuals<E>(rich: RichSlot<E>): {
|
|
|
81
81
|
readonly stepDistance: RichSlot<E>;
|
|
82
82
|
readonly viewLabel: Schema.Trimmed;
|
|
83
83
|
}>;
|
|
84
|
-
}
|
|
84
|
+
}>, "figure">;
|
|
85
85
|
};
|
|
@@ -22,7 +22,7 @@ export declare function parabolicVisuals<E>(rich: RichSlot<E>): {
|
|
|
22
22
|
readonly scenarioNames: Schema.$Record<Schema.Literals<readonly ["sixty-degree", "long-drive", "high-arc"]>, RichSlot<E>>;
|
|
23
23
|
readonly viewLabel: Schema.Trimmed;
|
|
24
24
|
}>;
|
|
25
|
-
}
|
|
25
|
+
}>, "figure">;
|
|
26
26
|
ParabolicMovementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
27
27
|
readonly decimalSeparator: Schema.optionalKey<Schema.Literals<readonly ["comma", "dot"]>>;
|
|
28
28
|
readonly defaultLaunchId: Schema.optionalKey<Schema.Literals<readonly ["low-angle", "balanced-angle", "high-angle"]>>;
|
|
@@ -38,5 +38,5 @@ export declare function parabolicVisuals<E>(rich: RichSlot<E>): {
|
|
|
38
38
|
readonly viewLabel: Schema.Trimmed;
|
|
39
39
|
}>;
|
|
40
40
|
readonly title: Schema.optionalKey<RichSlot<E>>;
|
|
41
|
-
}
|
|
41
|
+
}>, "figure">;
|
|
42
42
|
};
|
|
@@ -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
|
+
};
|