@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,93 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the energy conversion and efficiency labs. No prop states the
|
|
5
|
+
* conclusion a lab leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function efficiencyVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
HoistWorkLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly chooseMotor: Schema.Trimmed;
|
|
13
|
+
readonly energy: RichSlot<E>;
|
|
14
|
+
readonly height: RichSlot<E>;
|
|
15
|
+
readonly speed: RichSlot<E>;
|
|
16
|
+
readonly time: RichSlot<E>;
|
|
17
|
+
readonly viewLabel: Schema.Trimmed;
|
|
18
|
+
readonly weight: RichSlot<E>;
|
|
19
|
+
}>;
|
|
20
|
+
readonly motor: Schema.optionalKey<Schema.Literals<readonly ["small", "medium", "large"]>>;
|
|
21
|
+
}>, "figure">;
|
|
22
|
+
KettleHeatingLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
23
|
+
readonly description: RichSlot<E>;
|
|
24
|
+
readonly title: RichSlot<E>;
|
|
25
|
+
readonly fill: Schema.optionalKey<Schema.Literals<readonly ["half", "full", "brim"]>>;
|
|
26
|
+
readonly labels: Schema.Struct<{
|
|
27
|
+
readonly chooseFill: Schema.Trimmed;
|
|
28
|
+
readonly energy: RichSlot<E>;
|
|
29
|
+
readonly power: RichSlot<E>;
|
|
30
|
+
readonly rise: RichSlot<E>;
|
|
31
|
+
readonly time: RichSlot<E>;
|
|
32
|
+
readonly viewLabel: Schema.Trimmed;
|
|
33
|
+
}>;
|
|
34
|
+
}>, "figure">;
|
|
35
|
+
FlashlightEfficiencyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
36
|
+
readonly description: RichSlot<E>;
|
|
37
|
+
readonly title: RichSlot<E>;
|
|
38
|
+
readonly bulb: Schema.optionalKey<Schema.Literals<readonly ["filament", "led"]>>;
|
|
39
|
+
readonly labels: Schema.Struct<{
|
|
40
|
+
readonly battery: RichSlot<E>;
|
|
41
|
+
readonly bulbs: Schema.$Record<Schema.Literals<readonly ["filament", "led"]>, RichSlot<E>>;
|
|
42
|
+
readonly chooseBulb: Schema.Trimmed;
|
|
43
|
+
readonly efficiency: RichSlot<E>;
|
|
44
|
+
readonly heat: RichSlot<E>;
|
|
45
|
+
readonly input: RichSlot<E>;
|
|
46
|
+
readonly light: RichSlot<E>;
|
|
47
|
+
readonly runTime: RichSlot<E>;
|
|
48
|
+
readonly viewLabel: Schema.Trimmed;
|
|
49
|
+
}>;
|
|
50
|
+
}>, "figure">;
|
|
51
|
+
PendulumEnergyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
52
|
+
readonly description: RichSlot<E>;
|
|
53
|
+
readonly title: RichSlot<E>;
|
|
54
|
+
readonly drag: Schema.optionalKey<Schema.Literals<readonly ["none", "light", "strong"]>>;
|
|
55
|
+
readonly labels: Schema.Struct<{
|
|
56
|
+
readonly chooseDrag: Schema.Trimmed;
|
|
57
|
+
readonly drags: Schema.$Record<Schema.Literals<readonly ["none", "light", "strong"]>, RichSlot<E>>;
|
|
58
|
+
readonly heat: RichSlot<E>;
|
|
59
|
+
readonly kinetic: RichSlot<E>;
|
|
60
|
+
readonly potential: RichSlot<E>;
|
|
61
|
+
readonly start: RichSlot<E>;
|
|
62
|
+
readonly viewLabel: Schema.Trimmed;
|
|
63
|
+
}>;
|
|
64
|
+
}>, "figure">;
|
|
65
|
+
WeightLampEnergyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
66
|
+
readonly description: RichSlot<E>;
|
|
67
|
+
readonly title: RichSlot<E>;
|
|
68
|
+
readonly descent: Schema.optionalKey<Schema.Literals<readonly ["fast", "steady", "slow"]>>;
|
|
69
|
+
readonly labels: Schema.Struct<{
|
|
70
|
+
readonly chooseDescent: Schema.Trimmed;
|
|
71
|
+
readonly drop: RichSlot<E>;
|
|
72
|
+
readonly energy: RichSlot<E>;
|
|
73
|
+
readonly mass: RichSlot<E>;
|
|
74
|
+
readonly power: RichSlot<E>;
|
|
75
|
+
readonly time: RichSlot<E>;
|
|
76
|
+
readonly viewLabel: Schema.Trimmed;
|
|
77
|
+
}>;
|
|
78
|
+
}>, "figure">;
|
|
79
|
+
EnergyFlowLossLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
80
|
+
readonly description: RichSlot<E>;
|
|
81
|
+
readonly title: RichSlot<E>;
|
|
82
|
+
readonly labels: Schema.Struct<{
|
|
83
|
+
readonly choosePlant: Schema.Trimmed;
|
|
84
|
+
readonly efficiency: RichSlot<E>;
|
|
85
|
+
readonly input: RichSlot<E>;
|
|
86
|
+
readonly lost: RichSlot<E>;
|
|
87
|
+
readonly plants: Schema.$Record<Schema.Literals<readonly ["solar", "wind", "hydro", "geothermal", "biogas"]>, RichSlot<E>>;
|
|
88
|
+
readonly useful: RichSlot<E>;
|
|
89
|
+
readonly viewLabel: Schema.Trimmed;
|
|
90
|
+
}>;
|
|
91
|
+
readonly plant: Schema.optionalKey<Schema.Literals<readonly ["solar", "wind", "hydro", "geothermal", "biogas"]>>;
|
|
92
|
+
}>, "figure">;
|
|
93
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
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 `HoistWorkLab`: a motor hoist lifts a 20 kg crate 5 m onto a
|
|
6
|
+
* platform.
|
|
7
|
+
*/
|
|
8
|
+
function hoistWorkLab(rich) {
|
|
9
|
+
return figure(Schema.Struct({
|
|
10
|
+
...cardFields(rich),
|
|
11
|
+
labels: Schema.Struct({
|
|
12
|
+
chooseMotor: TextSchema,
|
|
13
|
+
energy: rich,
|
|
14
|
+
height: rich,
|
|
15
|
+
speed: rich,
|
|
16
|
+
time: rich,
|
|
17
|
+
viewLabel: TextSchema,
|
|
18
|
+
weight: rich,
|
|
19
|
+
}),
|
|
20
|
+
motor: Schema.optionalKey(Schema.Literals(["small", "medium", "large"])),
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props of `KettleHeatingLab`: an electric kettle boils 0.5 kg, 1 kg or 1.5 kg
|
|
25
|
+
* of water from 25 °C.
|
|
26
|
+
*/
|
|
27
|
+
function kettleHeatingLab(rich) {
|
|
28
|
+
return figure(Schema.Struct({
|
|
29
|
+
...cardFields(rich),
|
|
30
|
+
fill: Schema.optionalKey(Schema.Literals(["half", "full", "brim"])),
|
|
31
|
+
labels: Schema.Struct({
|
|
32
|
+
chooseFill: TextSchema,
|
|
33
|
+
energy: rich,
|
|
34
|
+
power: rich,
|
|
35
|
+
rise: rich,
|
|
36
|
+
time: rich,
|
|
37
|
+
viewLabel: TextSchema,
|
|
38
|
+
}),
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Props of `FlashlightEfficiencyLab`: a flashlight in a dark room, its cells
|
|
43
|
+
* drawn in cutaway.
|
|
44
|
+
*/
|
|
45
|
+
function flashlightEfficiencyLab(rich) {
|
|
46
|
+
return figure(Schema.Struct({
|
|
47
|
+
...cardFields(rich),
|
|
48
|
+
bulb: Schema.optionalKey(Schema.Literals(["filament", "led"])),
|
|
49
|
+
labels: Schema.Struct({
|
|
50
|
+
battery: rich,
|
|
51
|
+
bulbs: byIds(["filament", "led"], rich),
|
|
52
|
+
chooseBulb: TextSchema,
|
|
53
|
+
efficiency: rich,
|
|
54
|
+
heat: rich,
|
|
55
|
+
input: rich,
|
|
56
|
+
light: rich,
|
|
57
|
+
runTime: rich,
|
|
58
|
+
viewLabel: TextSchema,
|
|
59
|
+
}),
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Props of `PendulumEnergyLab`: a 1 kg bob on a 2 m string, let go from 40°,
|
|
64
|
+
* with its energy stores read 10 s after the release.
|
|
65
|
+
*/
|
|
66
|
+
function pendulumEnergyLab(rich) {
|
|
67
|
+
return figure(Schema.Struct({
|
|
68
|
+
...cardFields(rich),
|
|
69
|
+
drag: Schema.optionalKey(Schema.Literals(["none", "light", "strong"])),
|
|
70
|
+
labels: Schema.Struct({
|
|
71
|
+
chooseDrag: TextSchema,
|
|
72
|
+
drags: byIds(["none", "light", "strong"], rich),
|
|
73
|
+
heat: rich,
|
|
74
|
+
kinetic: rich,
|
|
75
|
+
potential: rich,
|
|
76
|
+
start: rich,
|
|
77
|
+
viewLabel: TextSchema,
|
|
78
|
+
}),
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
/** Props of `WeightLampEnergyLab`: a gravity lamp in a dark room. */
|
|
82
|
+
function weightLampEnergyLab(rich) {
|
|
83
|
+
return figure(Schema.Struct({
|
|
84
|
+
...cardFields(rich),
|
|
85
|
+
descent: Schema.optionalKey(Schema.Literals(["fast", "steady", "slow"])),
|
|
86
|
+
labels: Schema.Struct({
|
|
87
|
+
chooseDescent: TextSchema,
|
|
88
|
+
drop: rich,
|
|
89
|
+
energy: rich,
|
|
90
|
+
mass: rich,
|
|
91
|
+
power: rich,
|
|
92
|
+
time: rich,
|
|
93
|
+
viewLabel: TextSchema,
|
|
94
|
+
}),
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Props of `EnergyFlowLossLab`: 100 J entering five kinds of power plant, drawn
|
|
99
|
+
* as a band of light that every machine thins out.
|
|
100
|
+
*/
|
|
101
|
+
function energyFlowLossLab(rich) {
|
|
102
|
+
return figure(Schema.Struct({
|
|
103
|
+
...cardFields(rich),
|
|
104
|
+
labels: Schema.Struct({
|
|
105
|
+
choosePlant: TextSchema,
|
|
106
|
+
efficiency: rich,
|
|
107
|
+
input: rich,
|
|
108
|
+
lost: rich,
|
|
109
|
+
plants: byIds(["solar", "wind", "hydro", "geothermal", "biogas"], rich),
|
|
110
|
+
useful: rich,
|
|
111
|
+
viewLabel: TextSchema,
|
|
112
|
+
}),
|
|
113
|
+
plant: Schema.optionalKey(Schema.Literals(["solar", "wind", "hydro", "geothermal", "biogas"])),
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The props of the energy conversion and efficiency labs. No prop states the
|
|
118
|
+
* conclusion a lab leads to, so none holds answer state.
|
|
119
|
+
*/
|
|
120
|
+
export function efficiencyVisuals(rich) {
|
|
121
|
+
return {
|
|
122
|
+
HoistWorkLab: hoistWorkLab(rich),
|
|
123
|
+
KettleHeatingLab: kettleHeatingLab(rich),
|
|
124
|
+
FlashlightEfficiencyLab: flashlightEfficiencyLab(rich),
|
|
125
|
+
PendulumEnergyLab: pendulumEnergyLab(rich),
|
|
126
|
+
WeightLampEnergyLab: weightLampEnergyLab(rich),
|
|
127
|
+
EnergyFlowLossLab: energyFlowLossLab(rich),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the falling and projectile labs. No prop states the conclusion a
|
|
5
|
+
* lab leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function fallingVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
GalileoInclineBellsLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly acceleration: RichSlot<E>;
|
|
13
|
+
readonly chooseAngle: Schema.Trimmed;
|
|
14
|
+
readonly firstSecond: RichSlot<E>;
|
|
15
|
+
readonly gaps: RichSlot<E>;
|
|
16
|
+
readonly viewLabel: Schema.Trimmed;
|
|
17
|
+
}>;
|
|
18
|
+
}>, "figure">;
|
|
19
|
+
FeatherCoinVacuumLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
20
|
+
readonly description: RichSlot<E>;
|
|
21
|
+
readonly title: RichSlot<E>;
|
|
22
|
+
readonly labels: Schema.Struct<{
|
|
23
|
+
readonly airs: Schema.$Record<Schema.Literals<readonly ["air", "vacuum"]>, RichSlot<E>>;
|
|
24
|
+
readonly chooseAir: Schema.Trimmed;
|
|
25
|
+
readonly coinTime: RichSlot<E>;
|
|
26
|
+
readonly drop: RichSlot<E>;
|
|
27
|
+
readonly featherTime: RichSlot<E>;
|
|
28
|
+
readonly viewLabel: Schema.Trimmed;
|
|
29
|
+
}>;
|
|
30
|
+
}>, "figure">;
|
|
31
|
+
FallingTargetAimLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
32
|
+
readonly description: RichSlot<E>;
|
|
33
|
+
readonly title: RichSlot<E>;
|
|
34
|
+
readonly labels: Schema.Struct<{
|
|
35
|
+
readonly drop: RichSlot<E>;
|
|
36
|
+
readonly meetTime: RichSlot<E>;
|
|
37
|
+
readonly speed: RichSlot<E>;
|
|
38
|
+
readonly speedName: Schema.Trimmed;
|
|
39
|
+
readonly viewLabel: Schema.Trimmed;
|
|
40
|
+
}>;
|
|
41
|
+
readonly speed: Schema.optionalKey<Schema.Finite>;
|
|
42
|
+
}>, "figure">;
|
|
43
|
+
HoseJetProjectileLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
44
|
+
readonly description: RichSlot<E>;
|
|
45
|
+
readonly title: RichSlot<E>;
|
|
46
|
+
readonly angle: Schema.optionalKey<Schema.Literals<readonly [15, 30, 45, 60, 75, 90]>>;
|
|
47
|
+
readonly labels: Schema.Struct<{
|
|
48
|
+
readonly chooseAngle: Schema.Trimmed;
|
|
49
|
+
readonly flight: RichSlot<E>;
|
|
50
|
+
readonly range: RichSlot<E>;
|
|
51
|
+
readonly top: RichSlot<E>;
|
|
52
|
+
readonly viewLabel: Schema.Trimmed;
|
|
53
|
+
}>;
|
|
54
|
+
readonly speed: Schema.Finite;
|
|
55
|
+
}>, "figure">;
|
|
56
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** Props of `GalileoInclineBellsLab`: Galileo's inclined plane. */
|
|
5
|
+
function galileoInclineBellsLab(rich) {
|
|
6
|
+
return figure(Schema.Struct({
|
|
7
|
+
...cardFields(rich),
|
|
8
|
+
labels: Schema.Struct({
|
|
9
|
+
acceleration: rich,
|
|
10
|
+
chooseAngle: TextSchema,
|
|
11
|
+
firstSecond: rich,
|
|
12
|
+
gaps: rich,
|
|
13
|
+
viewLabel: TextSchema,
|
|
14
|
+
}),
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Props of `FeatherCoinVacuumLab`: a coin and a feather let go together inside
|
|
19
|
+
* a tall glass tube.
|
|
20
|
+
*/
|
|
21
|
+
function featherCoinVacuumLab(rich) {
|
|
22
|
+
return figure(Schema.Struct({
|
|
23
|
+
...cardFields(rich),
|
|
24
|
+
labels: Schema.Struct({
|
|
25
|
+
airs: byIds(["air", "vacuum"], rich),
|
|
26
|
+
chooseAir: TextSchema,
|
|
27
|
+
coinTime: rich,
|
|
28
|
+
drop: rich,
|
|
29
|
+
featherTime: rich,
|
|
30
|
+
viewLabel: TextSchema,
|
|
31
|
+
}),
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
/** Props of `FallingTargetAimLab`: the falling-target demonstration. */
|
|
35
|
+
function fallingTargetAimLab(rich) {
|
|
36
|
+
return figure(Schema.Struct({
|
|
37
|
+
...cardFields(rich),
|
|
38
|
+
labels: Schema.Struct({
|
|
39
|
+
drop: rich,
|
|
40
|
+
meetTime: rich,
|
|
41
|
+
speed: rich,
|
|
42
|
+
speedName: TextSchema,
|
|
43
|
+
viewLabel: TextSchema,
|
|
44
|
+
}),
|
|
45
|
+
speed: Schema.optionalKey(Schema.Finite),
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Props of `HoseJetProjectileLab`: a garden hose held at the ground and tilted
|
|
50
|
+
* to six angles.
|
|
51
|
+
*/
|
|
52
|
+
function hoseJetProjectileLab(rich) {
|
|
53
|
+
return figure(Schema.Struct({
|
|
54
|
+
...cardFields(rich),
|
|
55
|
+
angle: Schema.optionalKey(Schema.Literals([15, 30, 45, 60, 75, 90])),
|
|
56
|
+
labels: Schema.Struct({
|
|
57
|
+
chooseAngle: TextSchema,
|
|
58
|
+
flight: rich,
|
|
59
|
+
range: rich,
|
|
60
|
+
top: rich,
|
|
61
|
+
viewLabel: TextSchema,
|
|
62
|
+
}),
|
|
63
|
+
speed: Schema.Finite,
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The props of the falling and projectile labs. No prop states the conclusion a
|
|
68
|
+
* lab leads to, so none holds answer state.
|
|
69
|
+
*/
|
|
70
|
+
export function fallingVisuals(rich) {
|
|
71
|
+
return {
|
|
72
|
+
GalileoInclineBellsLab: galileoInclineBellsLab(rich),
|
|
73
|
+
FeatherCoinVacuumLab: featherCoinVacuumLab(rich),
|
|
74
|
+
FallingTargetAimLab: fallingTargetAimLab(rich),
|
|
75
|
+
HoseJetProjectileLab: hoseJetProjectileLab(rich),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the labs that add and resolve forces. No prop states the
|
|
5
|
+
* conclusion a lab leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function forceVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
ForceTableResultantLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly angle: RichSlot<E>;
|
|
13
|
+
readonly angleName: Schema.Trimmed;
|
|
14
|
+
readonly direction: RichSlot<E>;
|
|
15
|
+
readonly resultant: RichSlot<E>;
|
|
16
|
+
readonly sumX: RichSlot<E>;
|
|
17
|
+
readonly sumY: RichSlot<E>;
|
|
18
|
+
readonly viewLabel: Schema.Trimmed;
|
|
19
|
+
}>;
|
|
20
|
+
readonly pulls: Schema.$Array<Schema.Struct<{
|
|
21
|
+
readonly angle: Schema.Finite;
|
|
22
|
+
readonly mass: Schema.Finite;
|
|
23
|
+
}>>;
|
|
24
|
+
}>, "figure">;
|
|
25
|
+
TugOfWarForceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
26
|
+
readonly description: RichSlot<E>;
|
|
27
|
+
readonly title: RichSlot<E>;
|
|
28
|
+
readonly labels: Schema.Struct<{
|
|
29
|
+
readonly left: RichSlot<E>;
|
|
30
|
+
readonly leftCount: RichSlot<E>;
|
|
31
|
+
readonly leftName: Schema.Trimmed;
|
|
32
|
+
readonly net: RichSlot<E>;
|
|
33
|
+
readonly right: RichSlot<E>;
|
|
34
|
+
readonly rightCount: RichSlot<E>;
|
|
35
|
+
readonly rightName: Schema.Trimmed;
|
|
36
|
+
readonly viewLabel: Schema.Trimmed;
|
|
37
|
+
}>;
|
|
38
|
+
readonly left: Schema.Finite;
|
|
39
|
+
readonly pull: Schema.Finite;
|
|
40
|
+
readonly right: Schema.Finite;
|
|
41
|
+
}>, "figure">;
|
|
42
|
+
TugboatResultantLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
43
|
+
readonly description: RichSlot<E>;
|
|
44
|
+
readonly title: RichSlot<E>;
|
|
45
|
+
readonly between: Schema.Finite;
|
|
46
|
+
readonly first: Schema.Finite;
|
|
47
|
+
readonly labels: Schema.Struct<{
|
|
48
|
+
readonly between: RichSlot<E>;
|
|
49
|
+
readonly betweenName: Schema.Trimmed;
|
|
50
|
+
readonly fromFirst: RichSlot<E>;
|
|
51
|
+
readonly fromLine: RichSlot<E>;
|
|
52
|
+
readonly resultant: RichSlot<E>;
|
|
53
|
+
readonly viewLabel: Schema.Trimmed;
|
|
54
|
+
}>;
|
|
55
|
+
readonly second: Schema.Finite;
|
|
56
|
+
}>, "figure">;
|
|
57
|
+
RampBlockComponentLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
58
|
+
readonly description: RichSlot<E>;
|
|
59
|
+
readonly title: RichSlot<E>;
|
|
60
|
+
readonly angle: Schema.Finite;
|
|
61
|
+
readonly distance: Schema.optionalKey<Schema.Finite>;
|
|
62
|
+
readonly friction: Schema.Finite;
|
|
63
|
+
readonly labels: Schema.Struct<{
|
|
64
|
+
readonly along: RichSlot<E>;
|
|
65
|
+
readonly angle: RichSlot<E>;
|
|
66
|
+
readonly angleName: Schema.Trimmed;
|
|
67
|
+
readonly into: RichSlot<E>;
|
|
68
|
+
readonly viewLabel: Schema.Trimmed;
|
|
69
|
+
readonly weight: RichSlot<E>;
|
|
70
|
+
readonly work: Schema.optionalKey<RichSlot<E>>;
|
|
71
|
+
}>;
|
|
72
|
+
readonly mass: Schema.Finite;
|
|
73
|
+
}>, "figure">;
|
|
74
|
+
KiteStringTensionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
75
|
+
readonly description: RichSlot<E>;
|
|
76
|
+
readonly title: RichSlot<E>;
|
|
77
|
+
readonly angle: Schema.Finite;
|
|
78
|
+
readonly labels: Schema.Struct<{
|
|
79
|
+
readonly across: RichSlot<E>;
|
|
80
|
+
readonly angle: RichSlot<E>;
|
|
81
|
+
readonly angleName: Schema.Trimmed;
|
|
82
|
+
readonly up: RichSlot<E>;
|
|
83
|
+
readonly viewLabel: Schema.Trimmed;
|
|
84
|
+
}>;
|
|
85
|
+
readonly length: Schema.Finite;
|
|
86
|
+
readonly tension: Schema.Finite;
|
|
87
|
+
}>, "figure">;
|
|
88
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** Props of `ForceTableResultantLab`: a force table on a lab bench. */
|
|
5
|
+
function forceTableResultantLab(rich) {
|
|
6
|
+
return figure(Schema.Struct({
|
|
7
|
+
...cardFields(rich),
|
|
8
|
+
labels: Schema.Struct({
|
|
9
|
+
angle: rich,
|
|
10
|
+
angleName: TextSchema,
|
|
11
|
+
direction: rich,
|
|
12
|
+
resultant: rich,
|
|
13
|
+
sumX: rich,
|
|
14
|
+
sumY: rich,
|
|
15
|
+
viewLabel: TextSchema,
|
|
16
|
+
}),
|
|
17
|
+
pulls: Schema.Array(Schema.Struct({
|
|
18
|
+
angle: Schema.Finite,
|
|
19
|
+
mass: Schema.Finite.check(Schema.isGreaterThan(0)),
|
|
20
|
+
})),
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
/** Props of `TugOfWarForceLab`: a tug of war at sunset. */
|
|
24
|
+
function tugOfWarForceLab(rich) {
|
|
25
|
+
return figure(Schema.Struct({
|
|
26
|
+
...cardFields(rich),
|
|
27
|
+
labels: Schema.Struct({
|
|
28
|
+
left: rich,
|
|
29
|
+
leftCount: rich,
|
|
30
|
+
leftName: TextSchema,
|
|
31
|
+
net: rich,
|
|
32
|
+
right: rich,
|
|
33
|
+
rightCount: rich,
|
|
34
|
+
rightName: TextSchema,
|
|
35
|
+
viewLabel: TextSchema,
|
|
36
|
+
}),
|
|
37
|
+
left: Schema.Finite,
|
|
38
|
+
pull: Schema.Finite,
|
|
39
|
+
right: Schema.Finite,
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Props of `TugboatResultantLab`: two harbour tugs tow a bulk carrier, their
|
|
44
|
+
* cables opening at an angle.
|
|
45
|
+
*/
|
|
46
|
+
function tugboatResultantLab(rich) {
|
|
47
|
+
return figure(Schema.Struct({
|
|
48
|
+
...cardFields(rich),
|
|
49
|
+
between: Schema.Finite,
|
|
50
|
+
first: Schema.Finite,
|
|
51
|
+
labels: Schema.Struct({
|
|
52
|
+
between: rich,
|
|
53
|
+
betweenName: TextSchema,
|
|
54
|
+
fromFirst: rich,
|
|
55
|
+
fromLine: rich,
|
|
56
|
+
resultant: rich,
|
|
57
|
+
viewLabel: TextSchema,
|
|
58
|
+
}),
|
|
59
|
+
second: Schema.Finite,
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Props of `RampBlockComponentLab`: a wooden block on a pine plank hinged on a
|
|
64
|
+
* lab bench.
|
|
65
|
+
*/
|
|
66
|
+
function rampBlockComponentLab(rich) {
|
|
67
|
+
return figure(Schema.Struct({
|
|
68
|
+
...cardFields(rich),
|
|
69
|
+
angle: Schema.Finite,
|
|
70
|
+
distance: Schema.optionalKey(Schema.Finite),
|
|
71
|
+
friction: Schema.Finite,
|
|
72
|
+
labels: Schema.Struct({
|
|
73
|
+
along: rich,
|
|
74
|
+
angle: rich,
|
|
75
|
+
angleName: TextSchema,
|
|
76
|
+
into: rich,
|
|
77
|
+
viewLabel: TextSchema,
|
|
78
|
+
weight: rich,
|
|
79
|
+
work: Schema.optionalKey(rich),
|
|
80
|
+
}),
|
|
81
|
+
mass: Schema.Finite,
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Props of `KiteStringTensionLab`: a kite on a string tied to a stake, the wind
|
|
86
|
+
* carrying it downwind.
|
|
87
|
+
*/
|
|
88
|
+
function kiteStringTensionLab(rich) {
|
|
89
|
+
return figure(Schema.Struct({
|
|
90
|
+
...cardFields(rich),
|
|
91
|
+
angle: Schema.Finite,
|
|
92
|
+
labels: Schema.Struct({
|
|
93
|
+
across: rich,
|
|
94
|
+
angle: rich,
|
|
95
|
+
angleName: TextSchema,
|
|
96
|
+
up: rich,
|
|
97
|
+
viewLabel: TextSchema,
|
|
98
|
+
}),
|
|
99
|
+
length: Schema.Finite,
|
|
100
|
+
tension: Schema.Finite,
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The props of the labs that add and resolve forces. No prop states the
|
|
105
|
+
* conclusion a lab leads to, so none holds answer state.
|
|
106
|
+
*/
|
|
107
|
+
export function forceVisuals(rich) {
|
|
108
|
+
return {
|
|
109
|
+
ForceTableResultantLab: forceTableResultantLab(rich),
|
|
110
|
+
TugOfWarForceLab: tugOfWarForceLab(rich),
|
|
111
|
+
TugboatResultantLab: tugboatResultantLab(rich),
|
|
112
|
+
RampBlockComponentLab: rampBlockComponentLab(rich),
|
|
113
|
+
KiteStringTensionLab: kiteStringTensionLab(rich),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the labs that read a measuring instrument. No prop states the
|
|
5
|
+
* conclusion a lab leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function instrumentVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
MicrometerScrewLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly division: RichSlot<E>;
|
|
13
|
+
readonly reading: RichSlot<E>;
|
|
14
|
+
readonly size: Schema.Trimmed;
|
|
15
|
+
readonly sleeve: RichSlot<E>;
|
|
16
|
+
readonly viewLabel: Schema.Trimmed;
|
|
17
|
+
}>;
|
|
18
|
+
readonly thickness: Schema.optionalKey<Schema.Finite>;
|
|
19
|
+
}>, "figure">;
|
|
20
|
+
VernierCaliperLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
21
|
+
readonly description: RichSlot<E>;
|
|
22
|
+
readonly title: RichSlot<E>;
|
|
23
|
+
readonly labels: Schema.Struct<{
|
|
24
|
+
readonly centimetres: RichSlot<E>;
|
|
25
|
+
readonly line: RichSlot<E>;
|
|
26
|
+
readonly main: RichSlot<E>;
|
|
27
|
+
readonly reading: RichSlot<E>;
|
|
28
|
+
readonly viewLabel: Schema.Trimmed;
|
|
29
|
+
readonly width: Schema.Trimmed;
|
|
30
|
+
}>;
|
|
31
|
+
readonly width: Schema.optionalKey<Schema.Finite>;
|
|
32
|
+
}>, "figure">;
|
|
33
|
+
MicroscopeScaleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
34
|
+
readonly description: RichSlot<E>;
|
|
35
|
+
readonly title: RichSlot<E>;
|
|
36
|
+
readonly labels: Schema.Struct<{
|
|
37
|
+
readonly chooseObjective: Schema.Trimmed;
|
|
38
|
+
readonly diameter: RichSlot<E>;
|
|
39
|
+
readonly divisions: RichSlot<E>;
|
|
40
|
+
readonly metres: RichSlot<E>;
|
|
41
|
+
readonly oneDivision: RichSlot<E>;
|
|
42
|
+
readonly viewLabel: Schema.Trimmed;
|
|
43
|
+
}>;
|
|
44
|
+
}>, "figure">;
|
|
45
|
+
ParallaxReadingLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
46
|
+
readonly description: RichSlot<E>;
|
|
47
|
+
readonly title: RichSlot<E>;
|
|
48
|
+
readonly labels: Schema.Struct<{
|
|
49
|
+
readonly error: RichSlot<E>;
|
|
50
|
+
readonly eye: Schema.Trimmed;
|
|
51
|
+
readonly reading: RichSlot<E>;
|
|
52
|
+
readonly trueVolume: RichSlot<E>;
|
|
53
|
+
readonly viewLabel: Schema.Trimmed;
|
|
54
|
+
}>;
|
|
55
|
+
readonly offset: Schema.optionalKey<Schema.Finite>;
|
|
56
|
+
}>, "figure">;
|
|
57
|
+
LightGateSpeedLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
58
|
+
readonly description: RichSlot<E>;
|
|
59
|
+
readonly title: RichSlot<E>;
|
|
60
|
+
readonly distance: Schema.optionalKey<Schema.Finite>;
|
|
61
|
+
readonly labels: Schema.Struct<{
|
|
62
|
+
readonly distance: Schema.Trimmed;
|
|
63
|
+
readonly speed: RichSlot<E>;
|
|
64
|
+
readonly time: RichSlot<E>;
|
|
65
|
+
readonly viewLabel: Schema.Trimmed;
|
|
66
|
+
}>;
|
|
67
|
+
}>, "figure">;
|
|
68
|
+
StopwatchSpreadLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
69
|
+
readonly description: RichSlot<E>;
|
|
70
|
+
readonly title: RichSlot<E>;
|
|
71
|
+
readonly count: Schema.optionalKey<Schema.Finite>;
|
|
72
|
+
readonly labels: Schema.Struct<{
|
|
73
|
+
readonly mean: RichSlot<E>;
|
|
74
|
+
readonly spread: RichSlot<E>;
|
|
75
|
+
readonly trials: Schema.Trimmed;
|
|
76
|
+
readonly uncertainty: RichSlot<E>;
|
|
77
|
+
readonly viewLabel: Schema.Trimmed;
|
|
78
|
+
}>;
|
|
79
|
+
}>, "figure">;
|
|
80
|
+
PendulumPeriodLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
81
|
+
readonly description: RichSlot<E>;
|
|
82
|
+
readonly title: RichSlot<E>;
|
|
83
|
+
readonly labels: Schema.Struct<{
|
|
84
|
+
readonly check: RichSlot<E>;
|
|
85
|
+
readonly gravity: RichSlot<E>;
|
|
86
|
+
readonly length: Schema.Trimmed;
|
|
87
|
+
readonly masses: RichSlot<E>;
|
|
88
|
+
readonly period: RichSlot<E>;
|
|
89
|
+
readonly viewLabel: Schema.Trimmed;
|
|
90
|
+
}>;
|
|
91
|
+
readonly length: Schema.optionalKey<Schema.Finite>;
|
|
92
|
+
}>, "figure">;
|
|
93
|
+
};
|