@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,55 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the relative velocity labs. No prop states the conclusion a lab
|
|
5
|
+
* leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function relativeVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
RainDriveRelativeVelocityLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly car: Schema.optionalKey<Schema.Finite>;
|
|
12
|
+
readonly labels: Schema.Struct<{
|
|
13
|
+
readonly angle: RichSlot<E>;
|
|
14
|
+
readonly apparentSpeed: RichSlot<E>;
|
|
15
|
+
readonly carSpeed: RichSlot<E>;
|
|
16
|
+
readonly carSpeedName: Schema.Trimmed;
|
|
17
|
+
readonly chooseFrame: Schema.Trimmed;
|
|
18
|
+
readonly frames: Schema.$Record<Schema.Literals<readonly ["ground", "car"]>, RichSlot<E>>;
|
|
19
|
+
readonly rainSpeed: RichSlot<E>;
|
|
20
|
+
readonly viewLabel: Schema.Trimmed;
|
|
21
|
+
}>;
|
|
22
|
+
readonly rain: Schema.optionalKey<Schema.Finite>;
|
|
23
|
+
}>, "figure">;
|
|
24
|
+
RiverBoatCrossingLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
25
|
+
readonly description: RichSlot<E>;
|
|
26
|
+
readonly title: RichSlot<E>;
|
|
27
|
+
readonly boatSpeed: Schema.Finite;
|
|
28
|
+
readonly current: Schema.Finite;
|
|
29
|
+
readonly heading: Schema.optionalKey<Schema.Finite>;
|
|
30
|
+
readonly labels: Schema.Struct<{
|
|
31
|
+
readonly angle: RichSlot<E>;
|
|
32
|
+
readonly drift: RichSlot<E>;
|
|
33
|
+
readonly groundSpeed: RichSlot<E>;
|
|
34
|
+
readonly heading: RichSlot<E>;
|
|
35
|
+
readonly headingName: Schema.Trimmed;
|
|
36
|
+
readonly time: RichSlot<E>;
|
|
37
|
+
readonly viewLabel: Schema.Trimmed;
|
|
38
|
+
}>;
|
|
39
|
+
readonly width: Schema.Finite;
|
|
40
|
+
}>, "figure">;
|
|
41
|
+
TrainPassengerRelativeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
42
|
+
readonly description: RichSlot<E>;
|
|
43
|
+
readonly title: RichSlot<E>;
|
|
44
|
+
readonly labels: Schema.Struct<{
|
|
45
|
+
readonly chooseObserver: Schema.Trimmed;
|
|
46
|
+
readonly chooseWay: Schema.Trimmed;
|
|
47
|
+
readonly observers: Schema.$Record<Schema.Literals<readonly ["platform", "train"]>, RichSlot<E>>;
|
|
48
|
+
readonly passenger: RichSlot<E>;
|
|
49
|
+
readonly train: RichSlot<E>;
|
|
50
|
+
readonly viewLabel: Schema.Trimmed;
|
|
51
|
+
readonly walk: RichSlot<E>;
|
|
52
|
+
readonly ways: Schema.$Record<Schema.Literals<readonly ["forward", "backward"]>, RichSlot<E>>;
|
|
53
|
+
}>;
|
|
54
|
+
}>, "figure">;
|
|
55
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
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 `RainDriveRelativeVelocityLab`: rain falling straight down on a
|
|
6
|
+
* still day, watched from the roadside or from inside a moving car.
|
|
7
|
+
*/
|
|
8
|
+
function rainDriveRelativeVelocityLab(rich) {
|
|
9
|
+
return figure(Schema.Struct({
|
|
10
|
+
...cardFields(rich),
|
|
11
|
+
car: Schema.optionalKey(Schema.Finite),
|
|
12
|
+
labels: Schema.Struct({
|
|
13
|
+
angle: rich,
|
|
14
|
+
apparentSpeed: rich,
|
|
15
|
+
carSpeed: rich,
|
|
16
|
+
carSpeedName: TextSchema,
|
|
17
|
+
chooseFrame: TextSchema,
|
|
18
|
+
frames: byIds(["ground", "car"], rich),
|
|
19
|
+
rainSpeed: rich,
|
|
20
|
+
viewLabel: TextSchema,
|
|
21
|
+
}),
|
|
22
|
+
rain: Schema.optionalKey(Schema.Finite),
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Props of `RiverBoatCrossingLab`: a boat crossing a flowing river, seen from
|
|
27
|
+
* above.
|
|
28
|
+
*/
|
|
29
|
+
function riverBoatCrossingLab(rich) {
|
|
30
|
+
return figure(Schema.Struct({
|
|
31
|
+
...cardFields(rich),
|
|
32
|
+
boatSpeed: Schema.Finite,
|
|
33
|
+
current: Schema.Finite,
|
|
34
|
+
heading: Schema.optionalKey(Schema.Finite),
|
|
35
|
+
labels: Schema.Struct({
|
|
36
|
+
angle: rich,
|
|
37
|
+
drift: rich,
|
|
38
|
+
groundSpeed: rich,
|
|
39
|
+
heading: rich,
|
|
40
|
+
headingName: TextSchema,
|
|
41
|
+
time: rich,
|
|
42
|
+
viewLabel: TextSchema,
|
|
43
|
+
}),
|
|
44
|
+
width: Schema.Finite,
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Props of `TrainPassengerRelativeLab`: a passenger walks along a commuter
|
|
49
|
+
* carriage moving at 20 m/s.
|
|
50
|
+
*/
|
|
51
|
+
function trainPassengerRelativeLab(rich) {
|
|
52
|
+
return figure(Schema.Struct({
|
|
53
|
+
...cardFields(rich),
|
|
54
|
+
labels: Schema.Struct({
|
|
55
|
+
chooseObserver: TextSchema,
|
|
56
|
+
chooseWay: TextSchema,
|
|
57
|
+
observers: byIds(["platform", "train"], rich),
|
|
58
|
+
passenger: rich,
|
|
59
|
+
train: rich,
|
|
60
|
+
viewLabel: TextSchema,
|
|
61
|
+
walk: rich,
|
|
62
|
+
ways: byIds(["forward", "backward"], rich),
|
|
63
|
+
}),
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The props of the relative velocity labs. No prop states the conclusion a lab
|
|
68
|
+
* leads to, so none holds answer state.
|
|
69
|
+
*/
|
|
70
|
+
export function relativeVisuals(rich) {
|
|
71
|
+
return {
|
|
72
|
+
RainDriveRelativeVelocityLab: rainDriveRelativeVelocityLab(rich),
|
|
73
|
+
RiverBoatCrossingLab: riverBoatCrossingLab(rich),
|
|
74
|
+
TrainPassengerRelativeLab: trainPassengerRelativeLab(rich),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the solar energy labs. No prop states the conclusion a lab leads
|
|
5
|
+
* to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function solarVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
SolarPanelAngleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly labels: Schema.Struct<{
|
|
12
|
+
readonly incidence: RichSlot<E>;
|
|
13
|
+
readonly irradiance: RichSlot<E>;
|
|
14
|
+
readonly power: RichSlot<E>;
|
|
15
|
+
readonly sunControl: Schema.Trimmed;
|
|
16
|
+
readonly tiltControl: Schema.Trimmed;
|
|
17
|
+
readonly viewLabel: Schema.Trimmed;
|
|
18
|
+
}>;
|
|
19
|
+
readonly sun: Schema.optionalKey<Schema.Finite>;
|
|
20
|
+
readonly tilt: Schema.optionalKey<Schema.Finite>;
|
|
21
|
+
}>, "figure">;
|
|
22
|
+
SolarPanelHeatLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
23
|
+
readonly description: RichSlot<E>;
|
|
24
|
+
readonly title: RichSlot<E>;
|
|
25
|
+
readonly irradiance: Schema.optionalKey<Schema.Finite>;
|
|
26
|
+
readonly labels: Schema.Struct<{
|
|
27
|
+
readonly efficiency: RichSlot<E>;
|
|
28
|
+
readonly electric: RichSlot<E>;
|
|
29
|
+
readonly heat: RichSlot<E>;
|
|
30
|
+
readonly input: RichSlot<E>;
|
|
31
|
+
readonly irradianceControl: Schema.Trimmed;
|
|
32
|
+
readonly reflected: RichSlot<E>;
|
|
33
|
+
readonly temperature: RichSlot<E>;
|
|
34
|
+
readonly viewLabel: Schema.Trimmed;
|
|
35
|
+
}>;
|
|
36
|
+
}>, "figure">;
|
|
37
|
+
SolarRoofPaybackLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
38
|
+
readonly description: RichSlot<E>;
|
|
39
|
+
readonly title: RichSlot<E>;
|
|
40
|
+
readonly labels: Schema.Struct<{
|
|
41
|
+
readonly invested: RichSlot<E>;
|
|
42
|
+
readonly lifetime: RichSlot<E>;
|
|
43
|
+
readonly payback: RichSlot<E>;
|
|
44
|
+
readonly viewLabel: Schema.Trimmed;
|
|
45
|
+
readonly yearly: RichSlot<E>;
|
|
46
|
+
readonly yieldControl: Schema.Trimmed;
|
|
47
|
+
}>;
|
|
48
|
+
readonly yieldPerPeak: Schema.optionalKey<Schema.Finite>;
|
|
49
|
+
}>, "figure">;
|
|
50
|
+
SolarBatteryStorageLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
51
|
+
readonly description: RichSlot<E>;
|
|
52
|
+
readonly title: RichSlot<E>;
|
|
53
|
+
readonly labels: Schema.Struct<{
|
|
54
|
+
readonly chooseSize: Schema.Trimmed;
|
|
55
|
+
readonly demand: RichSlot<E>;
|
|
56
|
+
readonly size: RichSlot<E>;
|
|
57
|
+
readonly solar: RichSlot<E>;
|
|
58
|
+
readonly unmet: RichSlot<E>;
|
|
59
|
+
readonly viewLabel: Schema.Trimmed;
|
|
60
|
+
}>;
|
|
61
|
+
readonly size: Schema.optionalKey<Schema.Literals<readonly [5, 10, 15]>>;
|
|
62
|
+
}>, "figure">;
|
|
63
|
+
GreenhouseLayerLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
64
|
+
readonly description: RichSlot<E>;
|
|
65
|
+
readonly title: RichSlot<E>;
|
|
66
|
+
readonly absorptance: Schema.optionalKey<Schema.Finite>;
|
|
67
|
+
readonly labels: Schema.Struct<{
|
|
68
|
+
readonly absorptanceControl: Schema.Trimmed;
|
|
69
|
+
readonly back: RichSlot<E>;
|
|
70
|
+
readonly celsius: RichSlot<E>;
|
|
71
|
+
readonly emitted: RichSlot<E>;
|
|
72
|
+
readonly kelvin: RichSlot<E>;
|
|
73
|
+
readonly sunlight: RichSlot<E>;
|
|
74
|
+
readonly viewLabel: Schema.Trimmed;
|
|
75
|
+
}>;
|
|
76
|
+
}>, "figure">;
|
|
77
|
+
GridLoadCurveLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
78
|
+
readonly description: RichSlot<E>;
|
|
79
|
+
readonly title: RichSlot<E>;
|
|
80
|
+
readonly labels: Schema.Struct<{
|
|
81
|
+
readonly capacity: RichSlot<E>;
|
|
82
|
+
readonly chooseSchedule: Schema.Trimmed;
|
|
83
|
+
readonly energy: RichSlot<E>;
|
|
84
|
+
readonly hours: RichSlot<E>;
|
|
85
|
+
readonly peak: RichSlot<E>;
|
|
86
|
+
readonly schedules: Schema.$Record<Schema.Literals<readonly ["together", "spread"]>, RichSlot<E>>;
|
|
87
|
+
readonly viewLabel: Schema.Trimmed;
|
|
88
|
+
}>;
|
|
89
|
+
readonly schedule: Schema.optionalKey<Schema.Literals<readonly ["together", "spread"]>>;
|
|
90
|
+
}>, "figure">;
|
|
91
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
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 `SolarPanelAngleLab`: a solar panel on a stand under parallel rays
|
|
6
|
+
* of sunlight.
|
|
7
|
+
*/
|
|
8
|
+
function solarPanelAngleLab(rich) {
|
|
9
|
+
return figure(Schema.Struct({
|
|
10
|
+
...cardFields(rich),
|
|
11
|
+
labels: Schema.Struct({
|
|
12
|
+
incidence: rich,
|
|
13
|
+
irradiance: rich,
|
|
14
|
+
power: rich,
|
|
15
|
+
sunControl: TextSchema,
|
|
16
|
+
tiltControl: TextSchema,
|
|
17
|
+
viewLabel: TextSchema,
|
|
18
|
+
}),
|
|
19
|
+
sun: Schema.optionalKey(Schema.Finite),
|
|
20
|
+
tilt: Schema.optionalKey(Schema.Finite),
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
/** Props of `SolarPanelHeatLab`: a 1.6 m² solar panel on a roof. */
|
|
24
|
+
function solarPanelHeatLab(rich) {
|
|
25
|
+
return figure(Schema.Struct({
|
|
26
|
+
...cardFields(rich),
|
|
27
|
+
irradiance: Schema.optionalKey(Schema.Finite),
|
|
28
|
+
labels: Schema.Struct({
|
|
29
|
+
efficiency: rich,
|
|
30
|
+
electric: rich,
|
|
31
|
+
heat: rich,
|
|
32
|
+
input: rich,
|
|
33
|
+
irradianceControl: TextSchema,
|
|
34
|
+
reflected: rich,
|
|
35
|
+
temperature: rich,
|
|
36
|
+
viewLabel: TextSchema,
|
|
37
|
+
}),
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Props of `SolarRoofPaybackLab`: a 3 kWp solar roof starts in energy debt:
|
|
42
|
+
* making it took 3900 kWh.
|
|
43
|
+
*/
|
|
44
|
+
function solarRoofPaybackLab(rich) {
|
|
45
|
+
return figure(Schema.Struct({
|
|
46
|
+
...cardFields(rich),
|
|
47
|
+
labels: Schema.Struct({
|
|
48
|
+
invested: rich,
|
|
49
|
+
lifetime: rich,
|
|
50
|
+
payback: rich,
|
|
51
|
+
viewLabel: TextSchema,
|
|
52
|
+
yearly: rich,
|
|
53
|
+
yieldControl: TextSchema,
|
|
54
|
+
}),
|
|
55
|
+
yieldPerPeak: Schema.optionalKey(Schema.Finite),
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Props of `SolarBatteryStorageLab`: a village health post on a 3 kWp solar
|
|
60
|
+
* roof with a battery, through one day.
|
|
61
|
+
*/
|
|
62
|
+
function solarBatteryStorageLab(rich) {
|
|
63
|
+
return figure(Schema.Struct({
|
|
64
|
+
...cardFields(rich),
|
|
65
|
+
labels: Schema.Struct({
|
|
66
|
+
chooseSize: TextSchema,
|
|
67
|
+
demand: rich,
|
|
68
|
+
size: rich,
|
|
69
|
+
solar: rich,
|
|
70
|
+
unmet: rich,
|
|
71
|
+
viewLabel: TextSchema,
|
|
72
|
+
}),
|
|
73
|
+
size: Schema.optionalKey(Schema.Literals([5, 10, 15])),
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Props of `GreenhouseLayerLab`: Earth's surface under one layer of atmosphere.
|
|
78
|
+
*/
|
|
79
|
+
function greenhouseLayerLab(rich) {
|
|
80
|
+
return figure(Schema.Struct({
|
|
81
|
+
...cardFields(rich),
|
|
82
|
+
absorptance: Schema.optionalKey(Schema.Finite),
|
|
83
|
+
labels: Schema.Struct({
|
|
84
|
+
absorptanceControl: TextSchema,
|
|
85
|
+
back: rich,
|
|
86
|
+
celsius: rich,
|
|
87
|
+
emitted: rich,
|
|
88
|
+
kelvin: rich,
|
|
89
|
+
sunlight: rich,
|
|
90
|
+
viewLabel: TextSchema,
|
|
91
|
+
}),
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Props of `GridLoadCurveLab`: a village of 100 homes through one day on a 50
|
|
96
|
+
* kW mini-grid, above its hourly demand curve.
|
|
97
|
+
*/
|
|
98
|
+
function gridLoadCurveLab(rich) {
|
|
99
|
+
return figure(Schema.Struct({
|
|
100
|
+
...cardFields(rich),
|
|
101
|
+
labels: Schema.Struct({
|
|
102
|
+
capacity: rich,
|
|
103
|
+
chooseSchedule: TextSchema,
|
|
104
|
+
energy: rich,
|
|
105
|
+
hours: rich,
|
|
106
|
+
peak: rich,
|
|
107
|
+
schedules: byIds(["together", "spread"], rich),
|
|
108
|
+
viewLabel: TextSchema,
|
|
109
|
+
}),
|
|
110
|
+
schedule: Schema.optionalKey(Schema.Literals(["together", "spread"])),
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The props of the solar energy labs. No prop states the conclusion a lab leads
|
|
115
|
+
* to, so none holds answer state.
|
|
116
|
+
*/
|
|
117
|
+
export function solarVisuals(rich) {
|
|
118
|
+
return {
|
|
119
|
+
SolarPanelAngleLab: solarPanelAngleLab(rich),
|
|
120
|
+
SolarPanelHeatLab: solarPanelHeatLab(rich),
|
|
121
|
+
SolarRoofPaybackLab: solarRoofPaybackLab(rich),
|
|
122
|
+
SolarBatteryStorageLab: solarBatteryStorageLab(rich),
|
|
123
|
+
GreenhouseLayerLab: greenhouseLayerLab(rich),
|
|
124
|
+
GridLoadCurveLab: gridLoadCurveLab(rich),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* The props of the labs that add and resolve displacement vectors. No prop
|
|
5
|
+
* states the conclusion a lab leads to, so none holds answer state.
|
|
6
|
+
*/
|
|
7
|
+
export declare function vectorVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
AircraftCrosswindLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly title: RichSlot<E>;
|
|
11
|
+
readonly airspeed: Schema.Finite;
|
|
12
|
+
readonly heading: Schema.optionalKey<Schema.Finite>;
|
|
13
|
+
readonly labels: Schema.Struct<{
|
|
14
|
+
readonly between: RichSlot<E>;
|
|
15
|
+
readonly drift: RichSlot<E>;
|
|
16
|
+
readonly groundSpeed: RichSlot<E>;
|
|
17
|
+
readonly heading: RichSlot<E>;
|
|
18
|
+
readonly headingName: Schema.Trimmed;
|
|
19
|
+
readonly track: RichSlot<E>;
|
|
20
|
+
readonly viewLabel: Schema.Trimmed;
|
|
21
|
+
}>;
|
|
22
|
+
readonly toward: Schema.Finite;
|
|
23
|
+
readonly wind: Schema.Finite;
|
|
24
|
+
}>, "figure">;
|
|
25
|
+
DroneDisplacementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
26
|
+
readonly description: RichSlot<E>;
|
|
27
|
+
readonly title: RichSlot<E>;
|
|
28
|
+
readonly factors: Schema.optionalKey<Schema.$Array<Schema.Finite>>;
|
|
29
|
+
readonly hops: Schema.NonEmptyArray<Schema.Struct<{
|
|
30
|
+
readonly east: Schema.Finite;
|
|
31
|
+
readonly north: Schema.Finite;
|
|
32
|
+
readonly up: Schema.Finite;
|
|
33
|
+
}>>;
|
|
34
|
+
readonly labels: Schema.Struct<{
|
|
35
|
+
readonly chooseFactor: Schema.Trimmed;
|
|
36
|
+
readonly displacement: RichSlot<E>;
|
|
37
|
+
readonly path: RichSlot<E>;
|
|
38
|
+
readonly size: RichSlot<E>;
|
|
39
|
+
readonly viewLabel: Schema.Trimmed;
|
|
40
|
+
}>;
|
|
41
|
+
readonly units: Schema.optionalKey<Schema.Boolean>;
|
|
42
|
+
}>, "figure">;
|
|
43
|
+
OrienteeringMapVectorLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
44
|
+
readonly description: RichSlot<E>;
|
|
45
|
+
readonly title: RichSlot<E>;
|
|
46
|
+
readonly labels: Schema.Struct<{
|
|
47
|
+
readonly angle: RichSlot<E>;
|
|
48
|
+
readonly chooseView: Schema.Trimmed;
|
|
49
|
+
readonly east: RichSlot<E>;
|
|
50
|
+
readonly north: RichSlot<E>;
|
|
51
|
+
readonly size: RichSlot<E>;
|
|
52
|
+
readonly viewLabel: Schema.Trimmed;
|
|
53
|
+
readonly views: Schema.$Record<Schema.Literals<readonly ["forward", "back", "copy", "difference"]>, RichSlot<E>>;
|
|
54
|
+
}>;
|
|
55
|
+
readonly marks: Schema.Struct<{
|
|
56
|
+
readonly a: Schema.Struct<{
|
|
57
|
+
readonly east: Schema.Finite;
|
|
58
|
+
readonly north: Schema.Finite;
|
|
59
|
+
}>;
|
|
60
|
+
readonly b: Schema.Struct<{
|
|
61
|
+
readonly east: Schema.Finite;
|
|
62
|
+
readonly north: Schema.Finite;
|
|
63
|
+
}>;
|
|
64
|
+
readonly c: Schema.Struct<{
|
|
65
|
+
readonly east: Schema.Finite;
|
|
66
|
+
readonly north: Schema.Finite;
|
|
67
|
+
}>;
|
|
68
|
+
}>;
|
|
69
|
+
readonly views: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["forward", "back", "copy", "difference"]>>>;
|
|
70
|
+
}>, "figure">;
|
|
71
|
+
ShipBearingComponentLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
72
|
+
readonly description: RichSlot<E>;
|
|
73
|
+
readonly title: RichSlot<E>;
|
|
74
|
+
readonly courses: Schema.NonEmptyArray<Schema.Struct<{
|
|
75
|
+
readonly bearing: Schema.Finite;
|
|
76
|
+
readonly distance: Schema.Finite;
|
|
77
|
+
}>>;
|
|
78
|
+
readonly labels: Schema.Struct<{
|
|
79
|
+
readonly bearing: RichSlot<E>;
|
|
80
|
+
readonly bearingName: Schema.Trimmed;
|
|
81
|
+
readonly direction: RichSlot<E>;
|
|
82
|
+
readonly distance: RichSlot<E>;
|
|
83
|
+
readonly east: RichSlot<E>;
|
|
84
|
+
readonly north: RichSlot<E>;
|
|
85
|
+
readonly viewLabel: Schema.Trimmed;
|
|
86
|
+
}>;
|
|
87
|
+
}>, "figure">;
|
|
88
|
+
WindMapVectorLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
89
|
+
readonly description: RichSlot<E>;
|
|
90
|
+
readonly title: RichSlot<E>;
|
|
91
|
+
readonly angle: Schema.Finite;
|
|
92
|
+
readonly labels: Schema.Struct<{
|
|
93
|
+
readonly angle: RichSlot<E>;
|
|
94
|
+
readonly angleName: Schema.Trimmed;
|
|
95
|
+
readonly east: RichSlot<E>;
|
|
96
|
+
readonly north: RichSlot<E>;
|
|
97
|
+
readonly speed: RichSlot<E>;
|
|
98
|
+
readonly speedName: Schema.Trimmed;
|
|
99
|
+
readonly viewLabel: Schema.Trimmed;
|
|
100
|
+
}>;
|
|
101
|
+
readonly speed: Schema.Finite;
|
|
102
|
+
}>, "figure">;
|
|
103
|
+
};
|
|
@@ -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
|
+
/** A point on the orienteering map: metres east and north of the start. */
|
|
5
|
+
const MARK = Schema.Struct({ east: Schema.Finite, north: Schema.Finite });
|
|
6
|
+
/**
|
|
7
|
+
* Props of `AircraftCrosswindLab`: an airliner over farmland in a crosswind,
|
|
8
|
+
* seen from above.
|
|
9
|
+
*/
|
|
10
|
+
function aircraftCrosswindLab(rich) {
|
|
11
|
+
return figure(Schema.Struct({
|
|
12
|
+
...cardFields(rich),
|
|
13
|
+
airspeed: Schema.Finite,
|
|
14
|
+
heading: Schema.optionalKey(Schema.Finite),
|
|
15
|
+
labels: Schema.Struct({
|
|
16
|
+
between: rich,
|
|
17
|
+
drift: rich,
|
|
18
|
+
groundSpeed: rich,
|
|
19
|
+
heading: rich,
|
|
20
|
+
headingName: TextSchema,
|
|
21
|
+
track: rich,
|
|
22
|
+
viewLabel: TextSchema,
|
|
23
|
+
}),
|
|
24
|
+
toward: Schema.Finite,
|
|
25
|
+
wind: Schema.Finite,
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Props of `DroneDisplacementLab`: a drone takes off from a pad in a field and
|
|
30
|
+
* flies its plan leg by leg.
|
|
31
|
+
*/
|
|
32
|
+
function droneDisplacementLab(rich) {
|
|
33
|
+
return figure(Schema.Struct({
|
|
34
|
+
...cardFields(rich),
|
|
35
|
+
factors: Schema.optionalKey(Schema.Array(Schema.Finite)),
|
|
36
|
+
hops: Schema.NonEmptyArray(Schema.Struct({
|
|
37
|
+
east: Schema.Finite,
|
|
38
|
+
north: Schema.Finite,
|
|
39
|
+
up: Schema.Finite,
|
|
40
|
+
})),
|
|
41
|
+
labels: Schema.Struct({
|
|
42
|
+
chooseFactor: TextSchema,
|
|
43
|
+
displacement: rich,
|
|
44
|
+
path: rich,
|
|
45
|
+
size: rich,
|
|
46
|
+
viewLabel: TextSchema,
|
|
47
|
+
}),
|
|
48
|
+
units: Schema.optionalKey(Schema.Boolean),
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Props of `OrienteeringMapVectorLab`: an orienteering map of a city park with
|
|
53
|
+
* the start O (fuchsia triangle) and the checkpoints A, B and C in teal, amber
|
|
54
|
+
* and pink rings.
|
|
55
|
+
*/
|
|
56
|
+
function orienteeringMapVectorLab(rich) {
|
|
57
|
+
return figure(Schema.Struct({
|
|
58
|
+
...cardFields(rich),
|
|
59
|
+
labels: Schema.Struct({
|
|
60
|
+
angle: rich,
|
|
61
|
+
chooseView: TextSchema,
|
|
62
|
+
east: rich,
|
|
63
|
+
north: rich,
|
|
64
|
+
size: rich,
|
|
65
|
+
viewLabel: TextSchema,
|
|
66
|
+
views: byIds(["forward", "back", "copy", "difference"], rich),
|
|
67
|
+
}),
|
|
68
|
+
marks: Schema.Struct({ a: MARK, b: MARK, c: MARK }),
|
|
69
|
+
views: Schema.optionalKey(Schema.Array(Schema.Literals(["forward", "back", "copy", "difference"]))),
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Props of `ShipBearingComponentLab`: a ferry leaves its harbour in legs, each
|
|
74
|
+
* a distance on a compass bearing.
|
|
75
|
+
*/
|
|
76
|
+
function shipBearingComponentLab(rich) {
|
|
77
|
+
return figure(Schema.Struct({
|
|
78
|
+
...cardFields(rich),
|
|
79
|
+
courses: Schema.NonEmptyArray(Schema.Struct({
|
|
80
|
+
bearing: Schema.Finite,
|
|
81
|
+
distance: Schema.Finite.check(Schema.isGreaterThan(0)),
|
|
82
|
+
})),
|
|
83
|
+
labels: Schema.Struct({
|
|
84
|
+
bearing: rich,
|
|
85
|
+
bearingName: TextSchema,
|
|
86
|
+
direction: rich,
|
|
87
|
+
distance: rich,
|
|
88
|
+
east: rich,
|
|
89
|
+
north: rich,
|
|
90
|
+
viewLabel: TextSchema,
|
|
91
|
+
}),
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
/** Props of `WindMapVectorLab`: a steady sea wind on a weather map. */
|
|
95
|
+
function windMapVectorLab(rich) {
|
|
96
|
+
return figure(Schema.Struct({
|
|
97
|
+
...cardFields(rich),
|
|
98
|
+
angle: Schema.Finite,
|
|
99
|
+
labels: Schema.Struct({
|
|
100
|
+
angle: rich,
|
|
101
|
+
angleName: TextSchema,
|
|
102
|
+
east: rich,
|
|
103
|
+
north: rich,
|
|
104
|
+
speed: rich,
|
|
105
|
+
speedName: TextSchema,
|
|
106
|
+
viewLabel: TextSchema,
|
|
107
|
+
}),
|
|
108
|
+
speed: Schema.Finite,
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The props of the labs that add and resolve displacement vectors. No prop
|
|
113
|
+
* states the conclusion a lab leads to, so none holds answer state.
|
|
114
|
+
*/
|
|
115
|
+
export function vectorVisuals(rich) {
|
|
116
|
+
return {
|
|
117
|
+
AircraftCrosswindLab: aircraftCrosswindLab(rich),
|
|
118
|
+
DroneDisplacementLab: droneDisplacementLab(rich),
|
|
119
|
+
OrienteeringMapVectorLab: orienteeringMapVectorLab(rich),
|
|
120
|
+
ShipBearingComponentLab: shipBearingComponentLab(rich),
|
|
121
|
+
WindMapVectorLab: windMapVectorLab(rich),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
@@ -22,7 +22,7 @@ export declare function velocityVisuals<E>(rich: RichSlot<E>): {
|
|
|
22
22
|
readonly modeLabels: Schema.$Record<Schema.Literals<readonly ["straight", "bank", "loop"]>, RichSlot<E>>;
|
|
23
23
|
readonly viewLabel: Schema.Trimmed;
|
|
24
24
|
}>;
|
|
25
|
-
}
|
|
25
|
+
}>, "figure">;
|
|
26
26
|
DisplacementDistanceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
27
27
|
readonly description: RichSlot<E>;
|
|
28
28
|
readonly title: RichSlot<E>;
|
|
@@ -38,7 +38,7 @@ export declare function velocityVisuals<E>(rich: RichSlot<E>): {
|
|
|
38
38
|
readonly modeLabels: Schema.$Record<Schema.Literals<readonly ["straight", "turn", "return"]>, RichSlot<E>>;
|
|
39
39
|
readonly viewLabel: Schema.Trimmed;
|
|
40
40
|
}>;
|
|
41
|
-
}
|
|
41
|
+
}>, "figure">;
|
|
42
42
|
InstantaneousVelocitySpeedLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
43
43
|
readonly description: RichSlot<E>;
|
|
44
44
|
readonly title: RichSlot<E>;
|
|
@@ -51,7 +51,7 @@ export declare function velocityVisuals<E>(rich: RichSlot<E>): {
|
|
|
51
51
|
}>;
|
|
52
52
|
readonly viewLabel: Schema.Trimmed;
|
|
53
53
|
}>;
|
|
54
|
-
}
|
|
54
|
+
}>, "figure">;
|
|
55
55
|
RelativeMovementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
56
56
|
readonly description: RichSlot<E>;
|
|
57
57
|
readonly title: RichSlot<E>;
|
|
@@ -67,7 +67,7 @@ export declare function velocityVisuals<E>(rich: RichSlot<E>): {
|
|
|
67
67
|
readonly modeLabels: Schema.$Record<Schema.Literals<readonly ["same-direction", "opposite-direction"]>, RichSlot<E>>;
|
|
68
68
|
readonly viewLabel: Schema.Trimmed;
|
|
69
69
|
}>;
|
|
70
|
-
}
|
|
70
|
+
}>, "figure">;
|
|
71
71
|
StoppingDistanceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
72
72
|
readonly description: RichSlot<E>;
|
|
73
73
|
readonly title: RichSlot<E>;
|
|
@@ -79,7 +79,7 @@ export declare function velocityVisuals<E>(rich: RichSlot<E>): {
|
|
|
79
79
|
readonly stoppingDistance: RichSlot<E>;
|
|
80
80
|
readonly viewLabel: Schema.Trimmed;
|
|
81
81
|
}>;
|
|
82
|
-
}
|
|
82
|
+
}>, "figure">;
|
|
83
83
|
VelocitySpeedLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
84
84
|
readonly description: RichSlot<E>;
|
|
85
85
|
readonly title: RichSlot<E>;
|
|
@@ -94,7 +94,7 @@ export declare function velocityVisuals<E>(rich: RichSlot<E>): {
|
|
|
94
94
|
readonly modeLabels: Schema.$Record<Schema.Literals<readonly ["forward", "partialReturn", "backToStart"]>, RichSlot<E>>;
|
|
95
95
|
readonly viewLabel: Schema.Trimmed;
|
|
96
96
|
}>;
|
|
97
|
-
}
|
|
97
|
+
}>, "figure">;
|
|
98
98
|
VerticalMovementLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
99
99
|
readonly description: RichSlot<E>;
|
|
100
100
|
readonly title: RichSlot<E>;
|
|
@@ -108,5 +108,5 @@ export declare function velocityVisuals<E>(rich: RichSlot<E>): {
|
|
|
108
108
|
readonly time: RichSlot<E>;
|
|
109
109
|
readonly viewLabel: Schema.Trimmed;
|
|
110
110
|
}>;
|
|
111
|
-
}
|
|
111
|
+
}>, "figure">;
|
|
112
112
|
};
|