@nakafa/aksara-contracts 7.0.0 → 8.0.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/card.d.ts +0 -2
- package/dist/visual/card.js +0 -6
- package/dist/visual/catalog.d.ts +1610 -27079
- 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 -213
- package/dist/visual/mathematics/geometry.js +3 -65
- 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
- package/dist/visual/mathematics/line.d.ts +0 -179
- package/dist/visual/mathematics/line.js +0 -156
- package/dist/visual/mathematics/number.d.ts +0 -21
- package/dist/visual/mathematics/number.js +0 -53
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** Props of `HydroDamLab`: a hydropower dam in cross-section. */
|
|
5
|
+
function hydroDamLab(rich) {
|
|
6
|
+
return figure(Schema.Struct({
|
|
7
|
+
...cardFields(rich),
|
|
8
|
+
head: Schema.optionalKey(Schema.Finite),
|
|
9
|
+
labels: Schema.Struct({
|
|
10
|
+
electric: rich,
|
|
11
|
+
head: rich,
|
|
12
|
+
headControl: TextSchema,
|
|
13
|
+
kinetic: rich,
|
|
14
|
+
potential: rich,
|
|
15
|
+
shaft: rich,
|
|
16
|
+
speed: rich,
|
|
17
|
+
viewLabel: TextSchema,
|
|
18
|
+
}),
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
/** Props of `MicrohydroLab`: a microhydro plant on a hillside at dusk. */
|
|
22
|
+
function microhydroLab(rich) {
|
|
23
|
+
return figure(Schema.Struct({
|
|
24
|
+
...cardFields(rich),
|
|
25
|
+
flow: Schema.optionalKey(Schema.Finite),
|
|
26
|
+
head: Schema.optionalKey(Schema.Finite),
|
|
27
|
+
labels: Schema.Struct({
|
|
28
|
+
flowControl: TextSchema,
|
|
29
|
+
headControl: TextSchema,
|
|
30
|
+
homes: rich,
|
|
31
|
+
power: rich,
|
|
32
|
+
viewLabel: TextSchema,
|
|
33
|
+
}),
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Props of `WaveBuoyPowerLab`: a wave-energy buoy riding deep-water waves,
|
|
38
|
+
* drawn in cross-section with the height stretched four times.
|
|
39
|
+
*/
|
|
40
|
+
function waveBuoyPowerLab(rich) {
|
|
41
|
+
return figure(Schema.Struct({
|
|
42
|
+
...cardFields(rich),
|
|
43
|
+
labels: Schema.Struct({
|
|
44
|
+
chooseSea: TextSchema,
|
|
45
|
+
height: rich,
|
|
46
|
+
length: rich,
|
|
47
|
+
period: rich,
|
|
48
|
+
power: rich,
|
|
49
|
+
seas: byIds(["calm", "moderate", "rough"], rich),
|
|
50
|
+
viewLabel: TextSchema,
|
|
51
|
+
}),
|
|
52
|
+
sea: Schema.optionalKey(Schema.Literals(["calm", "moderate", "rough"])),
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Props of `WindRotorLab`: the same wind turbine, rotor 40 m long, at a valley,
|
|
57
|
+
* a hill top and a coast.
|
|
58
|
+
*/
|
|
59
|
+
function windRotorLab(rich) {
|
|
60
|
+
return figure(Schema.Struct({
|
|
61
|
+
...cardFields(rich),
|
|
62
|
+
labels: Schema.Struct({
|
|
63
|
+
chooseSite: TextSchema,
|
|
64
|
+
daily: rich,
|
|
65
|
+
electric: rich,
|
|
66
|
+
sites: byIds(["valley", "hill", "coast"], rich),
|
|
67
|
+
speed: rich,
|
|
68
|
+
viewLabel: TextSchema,
|
|
69
|
+
wind: rich,
|
|
70
|
+
}),
|
|
71
|
+
site: Schema.optionalKey(Schema.Literals(["valley", "hill", "coast"])),
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
/** Props of `GeothermalLoopLab`: a geothermal plant in cross-section. */
|
|
75
|
+
function geothermalLoopLab(rich) {
|
|
76
|
+
return figure(Schema.Struct({
|
|
77
|
+
...cardFields(rich),
|
|
78
|
+
labels: Schema.Struct({
|
|
79
|
+
electric: rich,
|
|
80
|
+
heat: rich,
|
|
81
|
+
ideal: rich,
|
|
82
|
+
real: rich,
|
|
83
|
+
reservoirControl: TextSchema,
|
|
84
|
+
viewLabel: TextSchema,
|
|
85
|
+
}),
|
|
86
|
+
reservoir: Schema.optionalKey(Schema.Finite),
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Props of `BiogasDigesterLab`: a household biogas digester in cross-section.
|
|
91
|
+
*/
|
|
92
|
+
function biogasDigesterLab(rich) {
|
|
93
|
+
return figure(Schema.Struct({
|
|
94
|
+
...cardFields(rich),
|
|
95
|
+
dung: Schema.optionalKey(Schema.Finite),
|
|
96
|
+
labels: Schema.Struct({
|
|
97
|
+
cooking: rich,
|
|
98
|
+
dungControl: TextSchema,
|
|
99
|
+
energy: rich,
|
|
100
|
+
gas: rich,
|
|
101
|
+
methane: rich,
|
|
102
|
+
viewLabel: TextSchema,
|
|
103
|
+
}),
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Props of `SteamPlantCycleLab`: a steam power plant fed 1000 MW of heat by
|
|
108
|
+
* coal, gas or uranium.
|
|
109
|
+
*/
|
|
110
|
+
function steamPlantCycleLab(rich) {
|
|
111
|
+
return figure(Schema.Struct({
|
|
112
|
+
...cardFields(rich),
|
|
113
|
+
fuel: Schema.optionalKey(Schema.Literals(["coal", "gas", "uranium"])),
|
|
114
|
+
labels: Schema.Struct({
|
|
115
|
+
chooseFuel: TextSchema,
|
|
116
|
+
electric: rich,
|
|
117
|
+
fuelUse: rich,
|
|
118
|
+
fuels: byIds(["coal", "gas", "uranium"], rich),
|
|
119
|
+
heat: rich,
|
|
120
|
+
ideal: rich,
|
|
121
|
+
steam: rich,
|
|
122
|
+
viewLabel: TextSchema,
|
|
123
|
+
waste: rich,
|
|
124
|
+
}),
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Props of `FuelCombustionCarbonLab`: 1 kg of coal, diesel or methane burns
|
|
129
|
+
* under a hood, and a balloon collects the carbon dioxide.
|
|
130
|
+
*/
|
|
131
|
+
function fuelCombustionCarbonLab(rich) {
|
|
132
|
+
return figure(Schema.Struct({
|
|
133
|
+
...cardFields(rich),
|
|
134
|
+
fuel: Schema.optionalKey(Schema.Literals(["coal", "diesel", "methane"])),
|
|
135
|
+
labels: Schema.Struct({
|
|
136
|
+
carbon: rich,
|
|
137
|
+
chooseFuel: TextSchema,
|
|
138
|
+
dioxide: rich,
|
|
139
|
+
fuels: byIds(["coal", "diesel", "methane"], rich),
|
|
140
|
+
oxygen: rich,
|
|
141
|
+
perEnergy: rich,
|
|
142
|
+
viewLabel: TextSchema,
|
|
143
|
+
volume: rich,
|
|
144
|
+
}),
|
|
145
|
+
}));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The props of the power plant labs. No prop states the conclusion a lab leads
|
|
149
|
+
* to, so none holds answer state.
|
|
150
|
+
*/
|
|
151
|
+
export function powerVisuals(rich) {
|
|
152
|
+
return {
|
|
153
|
+
HydroDamLab: hydroDamLab(rich),
|
|
154
|
+
MicrohydroLab: microhydroLab(rich),
|
|
155
|
+
WaveBuoyPowerLab: waveBuoyPowerLab(rich),
|
|
156
|
+
WindRotorLab: windRotorLab(rich),
|
|
157
|
+
GeothermalLoopLab: geothermalLoopLab(rich),
|
|
158
|
+
BiogasDigesterLab: biogasDigesterLab(rich),
|
|
159
|
+
SteamPlantCycleLab: steamPlantCycleLab(rich),
|
|
160
|
+
FuelCombustionCarbonLab: fuelCombustionCarbonLab(rich),
|
|
161
|
+
};
|
|
162
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the labs of significant figures, units, and derived quantities.
|
|
5
|
+
* No prop states the conclusion a lab leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function precisionVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
SignificantZerosLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly chooseTool: Schema.Trimmed;
|
|
13
|
+
readonly chooseUnit: Schema.Trimmed;
|
|
14
|
+
readonly figures: RichSlot<E>;
|
|
15
|
+
readonly measuredZeros: RichSlot<E>;
|
|
16
|
+
readonly placeZeros: RichSlot<E>;
|
|
17
|
+
readonly reading: RichSlot<E>;
|
|
18
|
+
readonly scientific: RichSlot<E>;
|
|
19
|
+
readonly tools: Schema.$Record<Schema.Literals<readonly ["tape", "ruler", "caliper"]>, RichSlot<E>>;
|
|
20
|
+
readonly viewLabel: Schema.Trimmed;
|
|
21
|
+
}>;
|
|
22
|
+
}>, "figure">;
|
|
23
|
+
DecimalSumLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
24
|
+
readonly description: RichSlot<E>;
|
|
25
|
+
readonly title: RichSlot<E>;
|
|
26
|
+
readonly labels: Schema.Struct<{
|
|
27
|
+
readonly chooseTool: Schema.Trimmed;
|
|
28
|
+
readonly copper: RichSlot<E>;
|
|
29
|
+
readonly iron: RichSlot<E>;
|
|
30
|
+
readonly raw: RichSlot<E>;
|
|
31
|
+
readonly reported: RichSlot<E>;
|
|
32
|
+
readonly tools: Schema.$Record<Schema.Literals<readonly ["ruler", "caliper"]>, RichSlot<E>>;
|
|
33
|
+
readonly viewLabel: Schema.Trimmed;
|
|
34
|
+
}>;
|
|
35
|
+
}>, "figure">;
|
|
36
|
+
PaperStackLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
37
|
+
readonly description: RichSlot<E>;
|
|
38
|
+
readonly title: RichSlot<E>;
|
|
39
|
+
readonly labels: Schema.Struct<{
|
|
40
|
+
readonly chooseStack: Schema.Trimmed;
|
|
41
|
+
readonly figures: RichSlot<E>;
|
|
42
|
+
readonly reading: RichSlot<E>;
|
|
43
|
+
readonly sheet: RichSlot<E>;
|
|
44
|
+
readonly viewLabel: Schema.Trimmed;
|
|
45
|
+
}>;
|
|
46
|
+
}>, "figure">;
|
|
47
|
+
BoltDimensionsLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
48
|
+
readonly description: RichSlot<E>;
|
|
49
|
+
readonly title: RichSlot<E>;
|
|
50
|
+
readonly labels: Schema.Struct<{
|
|
51
|
+
readonly chooseQuantity: Schema.Trimmed;
|
|
52
|
+
readonly dimension: RichSlot<E>;
|
|
53
|
+
readonly quantities: Schema.$Record<Schema.Literals<readonly ["length", "diameter", "area", "volume", "mass", "density"]>, RichSlot<E>>;
|
|
54
|
+
readonly value: RichSlot<E>;
|
|
55
|
+
readonly viewLabel: Schema.Trimmed;
|
|
56
|
+
}>;
|
|
57
|
+
}>, "figure">;
|
|
58
|
+
DensityMeasurementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
59
|
+
readonly description: RichSlot<E>;
|
|
60
|
+
readonly title: RichSlot<E>;
|
|
61
|
+
readonly labels: Schema.Struct<{
|
|
62
|
+
readonly chooseMaterial: Schema.Trimmed;
|
|
63
|
+
readonly density: RichSlot<E>;
|
|
64
|
+
readonly densitySi: RichSlot<E>;
|
|
65
|
+
readonly mass: RichSlot<E>;
|
|
66
|
+
readonly materials: Schema.$Record<Schema.Literals<readonly ["pine", "aluminium", "brass"]>, RichSlot<E>>;
|
|
67
|
+
readonly sides: RichSlot<E>;
|
|
68
|
+
readonly viewLabel: Schema.Trimmed;
|
|
69
|
+
readonly volume: RichSlot<E>;
|
|
70
|
+
}>;
|
|
71
|
+
}>, "figure">;
|
|
72
|
+
CommonReferenceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
73
|
+
readonly description: RichSlot<E>;
|
|
74
|
+
readonly title: RichSlot<E>;
|
|
75
|
+
readonly labels: Schema.Struct<{
|
|
76
|
+
readonly chooseReference: Schema.Trimmed;
|
|
77
|
+
readonly count: RichSlot<E>;
|
|
78
|
+
readonly desk: RichSlot<E>;
|
|
79
|
+
readonly length: RichSlot<E>;
|
|
80
|
+
readonly references: Schema.$Record<Schema.Literals<readonly ["short", "medium", "long", "rule"]>, RichSlot<E>>;
|
|
81
|
+
readonly viewLabel: Schema.Trimmed;
|
|
82
|
+
}>;
|
|
83
|
+
}>, "figure">;
|
|
84
|
+
UnitSystemsLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
85
|
+
readonly description: RichSlot<E>;
|
|
86
|
+
readonly title: RichSlot<E>;
|
|
87
|
+
readonly labels: Schema.Struct<{
|
|
88
|
+
readonly chooseSystem: Schema.Trimmed;
|
|
89
|
+
readonly diameter: RichSlot<E>;
|
|
90
|
+
readonly mass: RichSlot<E>;
|
|
91
|
+
readonly systems: Schema.$Record<Schema.Literals<readonly ["fps", "cgs", "mks"]>, RichSlot<E>>;
|
|
92
|
+
readonly time: RichSlot<E>;
|
|
93
|
+
readonly viewLabel: Schema.Trimmed;
|
|
94
|
+
}>;
|
|
95
|
+
}>, "figure">;
|
|
96
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
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 `SignificantZerosLab`: one steel rod read with a tape measure, a
|
|
6
|
+
* steel ruler and a long vernier caliper, and written in millimetres,
|
|
7
|
+
* centimetres or metres.
|
|
8
|
+
*/
|
|
9
|
+
function significantZerosLab(rich) {
|
|
10
|
+
return figure(Schema.Struct({
|
|
11
|
+
...cardFields(rich),
|
|
12
|
+
labels: Schema.Struct({
|
|
13
|
+
chooseTool: TextSchema,
|
|
14
|
+
chooseUnit: TextSchema,
|
|
15
|
+
figures: rich,
|
|
16
|
+
measuredZeros: rich,
|
|
17
|
+
placeZeros: rich,
|
|
18
|
+
reading: rich,
|
|
19
|
+
scientific: rich,
|
|
20
|
+
tools: byIds(["tape", "ruler", "caliper"], rich),
|
|
21
|
+
viewLabel: TextSchema,
|
|
22
|
+
}),
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Props of `DecimalSumLab`: an iron rod read with a caliper joined to a copper
|
|
27
|
+
* rod read with a ruler or the caliper.
|
|
28
|
+
*/
|
|
29
|
+
function decimalSumLab(rich) {
|
|
30
|
+
return figure(Schema.Struct({
|
|
31
|
+
...cardFields(rich),
|
|
32
|
+
labels: Schema.Struct({
|
|
33
|
+
chooseTool: TextSchema,
|
|
34
|
+
copper: rich,
|
|
35
|
+
iron: rich,
|
|
36
|
+
raw: rich,
|
|
37
|
+
reported: rich,
|
|
38
|
+
tools: byIds(["ruler", "caliper"], rich),
|
|
39
|
+
viewLabel: TextSchema,
|
|
40
|
+
}),
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
/** Props of `PaperStackLab`: a stack of paper beside a millimetre ruler. */
|
|
44
|
+
function paperStackLab(rich) {
|
|
45
|
+
return figure(Schema.Struct({
|
|
46
|
+
...cardFields(rich),
|
|
47
|
+
labels: Schema.Struct({
|
|
48
|
+
chooseStack: TextSchema,
|
|
49
|
+
figures: rich,
|
|
50
|
+
reading: rich,
|
|
51
|
+
sheet: rich,
|
|
52
|
+
viewLabel: TextSchema,
|
|
53
|
+
}),
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
/** Props of `BoltDimensionsLab`: one M10 bolt and six quantities. */
|
|
57
|
+
function boltDimensionsLab(rich) {
|
|
58
|
+
return figure(Schema.Struct({
|
|
59
|
+
...cardFields(rich),
|
|
60
|
+
labels: Schema.Struct({
|
|
61
|
+
chooseQuantity: TextSchema,
|
|
62
|
+
dimension: rich,
|
|
63
|
+
quantities: byIds(["length", "diameter", "area", "volume", "mass", "density"], rich),
|
|
64
|
+
value: rich,
|
|
65
|
+
viewLabel: TextSchema,
|
|
66
|
+
}),
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Props of `DensityMeasurementLab`: three blocks of the same size, pine,
|
|
71
|
+
* aluminium and brass, on a dial scale.
|
|
72
|
+
*/
|
|
73
|
+
function densityMeasurementLab(rich) {
|
|
74
|
+
return figure(Schema.Struct({
|
|
75
|
+
...cardFields(rich),
|
|
76
|
+
labels: Schema.Struct({
|
|
77
|
+
chooseMaterial: TextSchema,
|
|
78
|
+
density: rich,
|
|
79
|
+
densitySi: rich,
|
|
80
|
+
mass: rich,
|
|
81
|
+
materials: byIds(["pine", "aluminium", "brass"], rich),
|
|
82
|
+
sides: rich,
|
|
83
|
+
viewLabel: TextSchema,
|
|
84
|
+
volume: rich,
|
|
85
|
+
}),
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Props of `CommonReferenceLab`: one desk measured with three friends' pencils
|
|
90
|
+
* and with a metre rule.
|
|
91
|
+
*/
|
|
92
|
+
function commonReferenceLab(rich) {
|
|
93
|
+
return figure(Schema.Struct({
|
|
94
|
+
...cardFields(rich),
|
|
95
|
+
labels: Schema.Struct({
|
|
96
|
+
chooseReference: TextSchema,
|
|
97
|
+
count: rich,
|
|
98
|
+
desk: rich,
|
|
99
|
+
length: rich,
|
|
100
|
+
references: byIds(["short", "medium", "long", "rule"], rich),
|
|
101
|
+
viewLabel: TextSchema,
|
|
102
|
+
}),
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Props of `UnitSystemsLab`: a 16 lb bowling ball weighed on a dial scale and
|
|
107
|
+
* measured against a ruler with inches on one edge and centimetres on the
|
|
108
|
+
* other.
|
|
109
|
+
*/
|
|
110
|
+
function unitSystemsLab(rich) {
|
|
111
|
+
return figure(Schema.Struct({
|
|
112
|
+
...cardFields(rich),
|
|
113
|
+
labels: Schema.Struct({
|
|
114
|
+
chooseSystem: TextSchema,
|
|
115
|
+
diameter: rich,
|
|
116
|
+
mass: rich,
|
|
117
|
+
systems: byIds(["fps", "cgs", "mks"], rich),
|
|
118
|
+
time: rich,
|
|
119
|
+
viewLabel: TextSchema,
|
|
120
|
+
}),
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The props of the labs of significant figures, units, and derived quantities.
|
|
125
|
+
* No prop states the conclusion a lab leads to, so none holds answer state.
|
|
126
|
+
*/
|
|
127
|
+
export function precisionVisuals(rich) {
|
|
128
|
+
return {
|
|
129
|
+
SignificantZerosLab: significantZerosLab(rich),
|
|
130
|
+
DecimalSumLab: decimalSumLab(rich),
|
|
131
|
+
PaperStackLab: paperStackLab(rich),
|
|
132
|
+
BoltDimensionsLab: boltDimensionsLab(rich),
|
|
133
|
+
DensityMeasurementLab: densityMeasurementLab(rich),
|
|
134
|
+
CommonReferenceLab: commonReferenceLab(rich),
|
|
135
|
+
UnitSystemsLab: unitSystemsLab(rich),
|
|
136
|
+
};
|
|
137
|
+
}
|